shithub: mc

Download patch

ref: bc8c0ff895ba4ea2096c21446b10391d60ff5f5d
parent: 3badf9c6ec1f77fffcc6714888a44d715346b3d0
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Aug 31 09:15:38 EDT 2014

mkdate => mkinstant

--- a/lib/date/date.myr
+++ b/lib/date/date.myr
@@ -7,7 +7,7 @@
 	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,7 +26,7 @@
 const Days4y	= 365*4 + 1
 
 const utcnow = {
-	-> mkdate(std.now(), "")
+	-> mkinstant(std.now(), "")
 }
 
 const now = {tz : byte[:]
@@ -33,14 +33,14 @@
 	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 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)
 }