commit 1380705105a2926f265866f70809fd7864464c73
parent f9ed6c1d1531667dca8bbdaf4d213e32ff0ad84e
Author: Drew DeVault <sir@cmpwn.com>
Date: Wed, 13 Apr 2022 15:10:24 +0200
datetime: document format string constants
Signed-off-by: Drew DeVault <sir@cmpwn.com>
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/datetime/format.ha b/datetime/format.ha
@@ -7,11 +7,22 @@ use strings;
use strio;
use time::chrono;
+// [[datetime::format]] string for the email date format.
export def EMAIL: str = "%a, %d %b %Y %H:%M:%S %z";
+
+// [[datetime::format]] string for the email date format, with time zone.
export def EMAILZ: str = "%a, %d %b %Y %H:%M:%S %z %Z";
+
+// [[datetime::format]] string used by default for POSIX date(1).
export def POSIX: str = "%a %b %d %H:%M:%S %Z %Y";
+
+// [[datetime::format]] string compatible with RFC 3339.
export def RFC3339: str = "%Y-%m-%dT%H:%M:%S%z";
+
+// [[datetime::format]] string providing the current timestamp.
export def STAMP: str = "%Y-%m-%d %H:%M:%S";
+
+// [[datetime::format]] string providing the current timestamp with nanoseconds.
export def STAMP_NANO: str = "%Y-%m-%d %H:%M:%S.%N";
def WEEKDAYS: [_]str = [