FIND YOUR NEXT FEW LINES

Results for “Dates & process utilities”

Small, practical examples. Search by task or narrow things down below.

266 snippets foundClear filters
GoDates & times

Display an instant at a fixed offset

Display an instant at a fixed offset using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeLimits & process security

Drop all optional Linux capabilities

Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.

Docker / Compose✓ Tested
JavaDates & time zones

Find the last day of a month

Java: Use YearMonth so leap years and month lengths are handled by the calendar library.

Java✓ Tested
C#Dates & precise numbers

Find the length of a calendar month

C#: DaysInMonth applies the Gregorian leap-year rules.

C#✓ Tested
JavaDates & time zones

Find the next chosen weekday

Java: TemporalAdjusters.next excludes the starting day even if it already has that weekday.

Java✓ Tested
PythonDates & time zones

Find the number of days in a month

Python: Use calendar.monthrange to account for leap years.

Python✓ Tested
PowerShellDates & numeric validation

Find the number of days in a month

PowerShell: DaysInMonth handles leap-year February correctly.

PowerShell✓ Tested
GoDates & times

Find the weekday for a date

Find the weekday for a date using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellDates & numeric validation

Format a bounded duration as hours minutes and seconds

PowerShell: TimeSpan can format duration components with escaped separators.

PowerShell✓ Tested
GoDates & times

Format a UTC timestamp

Format a UTC timestamp using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsProcesses & environment

Handle a nonzero background-job exit

Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.

Bash Scripts✓ Tested
JavaDates & time zones

Measure a duration between instants

Java: Use Duration for elapsed timeline time and retrieve total seconds.

Java✓ Tested