FIND YOUR NEXT FEW LINES

Results for “Dates & time zones”

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

293 snippets foundClear filters
JavaScriptText handling & Unicode

Repeat a string a fixed number of times

JavaScript: String.repeat requires a nonnegative finite repetition count.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Repeat a string a fixed number of times

TypeScript: String.repeat requires a nonnegative finite repetition count.

TypeScript✓ Tested
Arduino / CTiming & control

Repeat an action a fixed number of times

Use a counter and delay for a simple finite sequence.

for loop✓ Tested
JavaText validation & formatting

Repeat text a fixed number of times

Java: Use String.repeat with a nonnegative repetition count.

Java✓ Tested
ReactEffects & lifecycle

Schedule a one-time update with cleanup

Schedule a one-time update with cleanup with a small React component and explicit browser behavior.

React✓ Tested
HTMLInput constraints

Select a time in quarter-hour increments

HTML: A time step is expressed in seconds, so 900 represents fifteen minutes.

HTML✓ Tested
ReactRefs & DOM interaction

Store and cancel a timer handle

Store and cancel a timer handle with a small React component and explicit browser behavior.

React✓ Tested
AngularLifecycle & observable data

Tie a subscription’s lifetime to its component

Tie a subscription’s lifetime to its component with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PowerShellDates & numeric validation

Format a bounded duration as hours minutes and seconds

PowerShell: TimeSpan can format duration components with escaped separators.

PowerShell✓ Tested
PythonStrings & dates

Parse and format a date

Convert a date string into a datetime object, then format it in a different, human-readable order.

date✓ Tested
Linux CommandsDates & process utilities

Add calendar days with GNU date

Linux Commands: Anchor date arithmetic at a fixed UTC date to avoid local daylight-saving ambiguity.

Linux Commands✓ Tested
C#Dates & precise numbers

Calculate an integer beyond the 64-bit range

C#: Use BigInteger for arbitrary-precision integer arithmetic.

C#✓ Tested