FIND YOUR NEXT FEW LINES

Results for “Dates & numeric validation”

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

303 snippets foundClear filters
C#Text validation & encoding

Validate a complete identifier with a regex

C#: Use absolute anchors and a timeout so the regex checks the complete input with a bounded execution time.

C#✓ Tested
PythonText validation & encoding

Validate an entire identifier

Python: Use fullmatch so a regex must consume the complete input.

Python✓ Tested
TypeScriptSafe data handling

Validate an unknown value with a type guard

Check a field before treating unknown data as a typed object.

unknown✓ Tested
GoErrors & validation

Validate UTF-8 bytes

Validate UTF-8 bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
GoErrors & validation

Wrap an error with context

Wrap an error with context using a complete Go program with explicit sample inputs.

Go✓ Tested
PostgresDates & series

Extract part of a date

Read a calendar component with EXTRACT.

EXTRACT✓ Tested
PostgresDates & series

Format a timestamp with to_char

Produce a fixed numeric date string.

to_char✓ Tested
PostgresDates & series

Add an interval to a date

Perform calendar arithmetic with an interval literal.

INTERVAL✓ Tested
C#Data & dates

Add calendar days

Use DateOnly for a date without a time zone in C#.

C#✓ Tested
JavaNumbers & dates

Add days to a date

Parse an ISO date and add calendar days using Java LocalDate.

Java✓ Tested
SQL ServerDates & text

Add days to a date

Use DATEADD for date arithmetic.

DATEADD✓ Tested
SQLiteDates & time

Add days to a date

Use a date modifier for calendar arithmetic.

date✓ Tested