Qrono: JavaScript Date Manipulation Library Demos

Download Back To CSSScript.Com

Handle date-only values, immutable date math, UTC parsing, and DST transitions with the Qrono JavaScript library.

Factory and conversion

Build the same instant from several inputs.

Change the source value and see string, object, array, native Date, timestamp, accessor, and immutable setter output update together.

Accepts ISO-like strings with either a space or T between date and time.

Calculation and boundaries

Add, subtract, and snap to unit boundaries.

Qrono treats calendar fields literally while time fields behave as durations, which keeps end-of-month work predictable.

QronoDate

Use date-only values without time noise.

This section uses qrono.date() for ISO week numbers, leap-year data, month length, year length, and date-only arithmetic.

Comparison

Compare dates and instants in either order.

The comparison methods work against other Qrono instances, native Date objects, and numeric timestamps.

Context and DST

Switch between UTC and local context.

Local mode uses the browser environment. Daylight-saving metrics depend on the time zone of the browser that opens this page.

The reject option displays an inline error when the browser reports a skipped or repeated local time.

Validation

See strict parsing and immutable output side by side.

The demo catches errors from invalid values and leaves the page responsive.

Waiting for input