diff options
-rw-r--r-- | lib/pure/times.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim index c16cae04b..5cc9b4993 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -541,6 +541,8 @@ elif defined(JS): proc getTimezone(): int = result = newDate().getTimezoneOffset() + proc epochTime*(): float {.tags: [TimeEffect].} = newDate().toSeconds() + proc getDateStr*(): string {.rtl, extern: "nt$1", tags: [TimeEffect].} = ## gets the current date as a string of the format ``YYYY-MM-DD``. var ti = getLocalTime(getTime()) |