diff options
Diffstat (limited to 'lib/date')
-rw-r--r-- | lib/date/fmt.myr | 4 | ||||
-rw-r--r-- | lib/date/test/fmt.myr | 2 | ||||
-rw-r--r-- | lib/date/types.myr | 16 | ||||
-rw-r--r-- | lib/date/zoneinfo+posixy.myr | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/lib/date/fmt.myr b/lib/date/fmt.myr index bc57500..c66827b 100644 --- a/lib/date/fmt.myr +++ b/lib/date/fmt.myr @@ -18,14 +18,14 @@ const __init__ = { ][:]) } -/* Always formats in proleptic Gregorian format */ +/* Always formats : proleptic Gregorian format */ const sbfmt = {sb, ap, opts var d : instant var fmt d = std.vanext(ap) fmt = Datetimefmt; - for o in opts + for o : opts match o | ("d", ""): fmt = Datefmt | ("t", ""): fmt = Timefmt diff --git a/lib/date/test/fmt.myr b/lib/date/test/fmt.myr index e0aa610..024c7b6 100644 --- a/lib/date/test/fmt.myr +++ b/lib/date/test/fmt.myr @@ -31,7 +31,7 @@ const main = { d = date.mkinstant(-50000000000*1_000_000, "") eq("385-7-25 07:06:40 +0000", std.bfmt(buf[:], "{D}", d)) - /* date in the bc */ + /* date : the bc */ d = date.mkinstant(-70000000000*1_000_000, "") eq("-249-11-19 19:33:20 +0000", std.bfmt(buf[:], "{D}", d)) diff --git a/lib/date/types.myr b/lib/date/types.myr index 3e3af76..0849052 100644 --- a/lib/date/types.myr +++ b/lib/date/types.myr @@ -4,14 +4,14 @@ pkg date = type instant = struct actual : std.time /* epoch time in microseconds */ tzoff : duration /* timezone offset in microseconds */ - year : int /* year, starting at 0 (ie, 1 BCE) */ - mon : int /* month, [1..12] */ - day : int /* day, [1..31] */ - wday : int /* weekday, [0..6] */ - h : int /* hour: [0..23] */ - m : int /* minute: [0..59] */ - s : int /* second: [0..59] */ - us : int /* microsecond: [0..999,999] */ + year : int /* year, starting at 0 (ie, 1 BCE) */ + mon : int /* month, [1..12] */ + day : int /* day, [1..31] */ + wday : int /* weekday, [0..6] */ + h : int /* hour: [0..23] */ + m : int /* minute: [0..59] */ + s : int /* second: [0..59] */ + us : int /* microsecond: [0..999,999] */ tzname : byte[:] /* current time zone name */ _tzbuf : byte[32] /* current time zone name storage */ ;; diff --git a/lib/date/zoneinfo+posixy.myr b/lib/date/zoneinfo+posixy.myr index 26aa916..69b2e85 100644 --- a/lib/date/zoneinfo+posixy.myr +++ b/lib/date/zoneinfo+posixy.myr @@ -47,7 +47,7 @@ const findtzoff = {tz, tm -> std.option(date.duration) path = std.sldup("/etc/localtime") else path = "" - for z in zonepath + for z : zonepath path = std.pathcat(z, tz) if sys.stat(path, &sb) == 0 goto found |