all repos — min @ beee3cc64938ee7c4155bdedfa87851f2fd1b343

A small but practical concatenative programming language.

Fix `timestamp` on devel
SolitudeSF solitudesf@protonmail.com
Wed, 20 Jun 2018 20:59:25 +0300
commit

beee3cc64938ee7c4155bdedfa87851f2fd1b343

parent

6483cd0eacce1dad832ff5edf75bf2180633a360

1 files changed, 11 insertions(+), 11 deletions(-)

jump to
M lib/min_time.nimlib/min_time.nim

@@ -1,10 +1,10 @@

-import - times, +import + times, tables -import - ../core/parser, - ../core/value, - ../core/interpreter, +import + ../core/parser, + ../core/value, + ../core/interpreter, ../core/utils # Time

@@ -12,13 +12,13 @@

proc time_module*(i: In)= let def = i.define() - + def.symbol("timestamp") do (i: In): - i.push getTime().int.newVal - + i.push getTime().toUnix().newVal + def.symbol("now") do (i: In): i.push epochTime().newVal - + def.symbol("timeinfo") do (i: In): let vals = i.expect("num") let t = vals[0]

@@ -79,5 +79,5 @@ time = t.intVal.fromUnix

else: time = t.floatVal.int64.fromUnix i.push time.local.format(s.getString).newVal - + def.finalize("time")