summaryrefslogtreecommitdiff
path: root/lib/date
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-07-17 15:30:01 -0700
committerOri Bernstein <ori@markovcorp.com>2017-07-17 15:30:01 -0700
commit492aca3ff6f829ee09c52e17c86a808430ee7df4 (patch)
treef97424e14c9d3277c78ff53082daec725e1f4dcb /lib/date
parent11f79ed8ff75049f6b1866d70bc032c8d18b1463 (diff)
downloadmc-492aca3ff6f829ee09c52e17c86a808430ee7df4.tar.gz
Convert from `in` to `:`.
The winds of change are a-blowin.
Diffstat (limited to 'lib/date')
-rw-r--r--lib/date/fmt.myr4
-rw-r--r--lib/date/test/fmt.myr2
-rw-r--r--lib/date/types.myr16
-rw-r--r--lib/date/zoneinfo+posixy.myr2
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