aboutsummaryrefslogtreecommitdiff
path: root/test/01-native.janet
blob: 442a6513cf33ee20efa33e758640ef9cb0b89056 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(use date/native)

# you always start with this
# `time` returns the time in UTC
(def now (time))

# if you want to modify the time, you should use localtime, like so
(def lt (:localtime now))
(update lt :sec |(+ $ 2000))
(update lt :year |(- $ 10))

(def gt (:gmtime now))
(put gt :sec 13)

(pp now)
(pp lt)
(pp gt)