13 Commits

Author SHA1 Message Date
flysand7
47eefb3f21 [datetime]: Remove the definition of EPOCH 2025-03-06 20:28:12 +11:00
Colin Davidson
4c8e355444 tweaks per laytan suggestions 2024-10-10 09:14:29 -07:00
Colin Davidson
a6502c3e8c Initial cut of timezones 2024-10-09 19:26:43 -07:00
Karl Zylinski
19f0127e55 Moved all packages in core, base, vendor, tests and examples to use new #+ file tag syntax. 2024-09-14 18:27:49 +02:00
flysand7
0c78cab336 [time/datetime]: Document package datetime 2024-07-20 12:49:40 +11:00
Jeroen van Rijn
22fabba2f6 Fix #3873 2024-07-05 00:48:08 +02:00
Feoramund
bd198aeada Fix #3460 2024-06-10 23:37:54 -04:00
Chris
60478c0e07 Remove using from validate_datetime 2024-04-09 10:57:51 +01:00
Jeroen van Rijn
fda283c55e More better validation. 2024-03-20 23:09:09 +01:00
Jeroen van Rijn
ed5fd15f6e Ensmallen Date struct. 2024-03-20 18:13:29 +01:00
Jeroen van Rijn
89ca15014c Ensmallen Time struct. 2024-03-20 18:09:07 +01:00
Jeroen van Rijn
9c144dd24f Change Ordinal from int to i64 2024-03-20 17:56:22 +01:00
Jeroen van Rijn
72c15d7699 Add WiP datetime package and tests.
A new package `core:time/datetime` has been added which can represent moments much further in the past and future than `core:time`.
It is based on *the* reference work on the subject, Calendrical Calculations Ultimate Edition, Reingold & Dershowitz.

More procedures will be added to it in the future, to for example calculate the 3rd Thursday in March to figure out holidays.
The package has been tested for more than a year and can handle dates 25 quadrillion years into the past and future with 64-bit day ordinals, or 5 million with 32-bit ones.

This also fixes a longstanding bug where converting between YYYY-MM:DD hh:mm:ss and `time.Time` and back could result in a mismatch.

RFC 3339 timestamps can now also be parsed using the `core:time` package.
2024-03-18 16:47:16 +01:00