diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-17 14:49:03 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-17 14:49:03 -0500 |
| commit | 4231789b71bb42c4ab04e125f98fe5eb3cf030b6 (patch) | |
| tree | c73aafaeef60b77555cfd25ccd30c618e431d52a /test/datetime.tm | |
| parent | c1ae79ac3c320923363994fb88f4cc2fa13317ce (diff) | |
Rename datetime -> moment
Diffstat (limited to 'test/datetime.tm')
| -rw-r--r-- | test/datetime.tm | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/test/datetime.tm b/test/datetime.tm deleted file mode 100644 index 64077c27..00000000 --- a/test/datetime.tm +++ /dev/null @@ -1,49 +0,0 @@ - -func main(): - >> 2024-1-1 12:00[America/New_York] == 2024-1-1T09:00[America/Los_Angeles] - = yes - >> 2024-1-1 12:00[America/New_York] == DateTime(2024, 1, 1, hour=9, timezone="America/Los_Angeles") - = yes - - >> t := 2024-1-2 13:45[America/New_York] - >> t:after(days=40) == 2024-2-11T13:45:00[America/New_York] - = yes - >> t:date(timezone="America/New_York") - = "2024-01-02" - - >> t:time(timezone="America/New_York") - = "1:45pm" - - >> t:time(am_pm=no, timezone="America/New_York") - = "13:45" - - >> t:relative(relative_to=t:after(minutes=65)) - = "1 hour ago" - - >> t:seconds_till(t:after(minutes=2)) - = 120 - - >> t:minutes_till(t:after(minutes=2)) - = 2 - - >> t:hours_till(t:after(minutes=60)) - = 1 - - >> t:day_of_week() # 1 = Sun, 2 = Mon, 3 = Tue - = 3 - - >> t:format("%A") - = "Tuesday" - - >> t:unix_timestamp() - = Int64(1704221100) - >> t == DateTime.from_unix_timestamp(1704221100) - = yes - - >> t < t:after(minutes=1) - = yes - - >> t < t:after(seconds=0.1) - = yes - - >> now() |
