DateTz Playground

A live test bench for @open-rlb/date-tz

World Clock

Live times across the globe, rendered with DateTz.now(tz).toString(). Updated every second.

Your local time
Unix timestamp (ms)

Timestamp → DateTz

Build a DateTz from a Unix timestamp and inspect every getter.

Parse string → DateTz

Invokes DateTz.parse(dateString, pattern, tz).

Format DateTz → string

Calls date.toString(pattern, locale). Experiment with the full token set.

Format tokens reference
TokenMeaning
YYYY / yyyyFull year
YY / yy2-digit year
MMMonth 01–12
LMLong month name (locale)
SMShort month name (locale)
DDDay of month 01–31
HHHour 00–23
hhHour 01–12 (needs aa/AA)
mmMinute
ssSecond
aa / AAam/pm — AM/PM
WLLong weekday name
WSShort weekday name
tzTimezone identifier

Cross-timezone view (readIn)

One absolute instant, experienced by readers in different timezones.

Manipulate

Chain add / set operations and watch the timestamp evolve.