summaryrefslogtreecommitdiff
path: root/lib/date
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-12-25 16:14:38 -0800
committerOri Bernstein <ori@eigenstate.org>2017-12-25 16:14:38 -0800
commit52eca667bbd1cf5a929d3f2352c3c1ee8e91625d (patch)
tree63e24e0a4d59688bb25c632d23cccea57209bcfd /lib/date
parent68a437bb6d370781e18ad1b794cc34c21dd5b361 (diff)
downloadmc-52eca667bbd1cf5a929d3f2352c3c1ee8e91625d.tar.gz
Formatting as a state machine.
Diffstat (limited to 'lib/date')
-rw-r--r--lib/date/fmt.myr7
-rw-r--r--lib/date/parse.myr2
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/date/fmt.myr b/lib/date/fmt.myr
index 39df830..34bdaa4 100644
--- a/lib/date/fmt.myr
+++ b/lib/date/fmt.myr
@@ -10,12 +10,7 @@ pkg date =
const __init__ = {
var d : instant
- std.fmtinstall(std.typeof(d), sbfmt, [
- ("D", false),
- ("d", false),
- ("t", false),
- ("f", true),
- ][:])
+ std.fmtinstall(std.typeof(d), sbfmt)
}
/* Always formats : proleptic Gregorian format */
diff --git a/lib/date/parse.myr b/lib/date/parse.myr
index d7d8af3..6c6d0d7 100644
--- a/lib/date/parse.myr
+++ b/lib/date/parse.myr
@@ -38,7 +38,7 @@ type parsedtz = union
const __init__ = {
var fail : parsefail
- std.fmtinstall(std.typeof(fail), failfmt, [][:])
+ std.fmtinstall(std.typeof(fail), failfmt)
}
const strparse = {f, s, tz, replace