aboutsummaryrefslogtreecommitdiff
path: root/docs/datetime.md
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-30 13:58:43 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-30 13:58:43 -0400
commit2ba07c2cf53a765d4decb2cb09dbf5e1e99f1966 (patch)
tree77f322fc2d79f72785053ac0963130cca511eaff /docs/datetime.md
parentec0606091bdcc8a8473ba909fb8ca2d873ce4a59 (diff)
Update docs
Diffstat (limited to 'docs/datetime.md')
-rw-r--r--docs/datetime.md17
1 files changed, 17 insertions, 0 deletions
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