summaryrefslogtreecommitdiff
path: root/lib/date
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-08-31 13:15:38 -0400
committerOri Bernstein <ori@eigenstate.org>2014-08-31 13:15:38 -0400
commitbc8c0ff895ba4ea2096c21446b10391d60ff5f5d (patch)
tree22770edd44692d36c8dc838cd88b69bfa2ed9642 /lib/date
parent3badf9c6ec1f77fffcc6714888a44d715346b3d0 (diff)
downloadmc-bc8c0ff895ba4ea2096c21446b10391d60ff5f5d.tar.gz
mkdate => mkinstant
Diffstat (limited to 'lib/date')
-rw-r--r--lib/date/date.myr14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/date/date.myr b/lib/date/date.myr
index dee902a..c79ea99 100644
--- a/lib/date/date.myr
+++ b/lib/date/date.myr
@@ -7,7 +7,7 @@ pkg date =
const utcnow : (-> instant)
const now : (tz : byte[:] -> instant)
const tozone : (d : instant, zone : byte[:] -> instant)
- const mkdate : (tm : std.time, zone : byte[:] -> instant)
+ const mkinstant : (tm : std.time, zone : byte[:] -> instant)
const localoff : (tm : std.time -> delta)
const tzoff : (tzname : byte[:], tm : std.time -> delta)
@@ -26,21 +26,21 @@ const Days400y = 365*400 + 4*25 - 3
const Days4y = 365*4 + 1
const utcnow = {
- -> mkdate(std.now(), "")
+ -> mkinstant(std.now(), "")
}
const now = {tz : byte[:]
var tm
tm = std.now()
- -> mkdate(tm, tz)
+ -> mkinstant(tm, tz)
}
const tozone = {d, tz
- -> mkdate(d.actual, tz)
+ -> mkinstant(d.actual, tz)
}
-const mkdate = {tm, tz
+const mkinstant = {tm, tz
var j, y, m, d
var t, e
var date
@@ -117,11 +117,11 @@ const isleap = {d
}
const add = {d, dt
- -> mkdate(d.actual + (dt castto(std.time)), d.tzname)
+ -> mkinstant(d.actual + (dt castto(std.time)), d.tzname)
}
const sub = {d, dt
- -> mkdate(d.actual - (dt castto(std.time)), d.tzname)
+ -> mkinstant(d.actual - (dt castto(std.time)), d.tzname)
}