From 2ba07c2cf53a765d4decb2cb09dbf5e1e99f1966 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 30 Sep 2024 13:58:43 -0400 Subject: Update docs --- docs/datetime.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/datetime.md') diff --git a/docs/datetime.md b/docs/datetime.md index 702045fc..dd02b206 100644 --- a/docs/datetime.md +++ b/docs/datetime.md @@ -15,6 +15,23 @@ is as correct as possible, but counterintuitive behaviors around time zones, daylight savings time, leap seconds, and other anomalous time situations can still cause bugs if you're not extremely careful. +## Syntax + +DateTime literals can be specified using [ISO +8601](https://en.wikipedia.org/wiki/ISO_8601) syntax with an optional +square-bracket delimited time zone name afterwards. A space may be used instead +of a `T` in the ISO 8601 format for readability, and spaces may come before the +timezone. + +```tomo +2024-09-30 +2024-09-30T13:57 +2024-09-30 13:57 +2024-09-30 13:57:01 +2024-09-30 13:57:01 +04:00 +2024-09-30 13:57:01 [America/New_York] +``` + ## Time Zones Because humans are not able to easily understand UNIX timestamps, the default -- cgit v1.2.3