18 Commits

Author SHA1 Message Date
Colin Davidson
f8586d0051 oops, copy-paste-bug 2024-11-20 15:33:20 -08:00
Colin Davidson
3bb73eacfc fix parsing issue around utc/localtime split 2024-11-20 12:09:32 -08:00
Colin Davidson
c9158b3220 add new test, better fail-check, and non-transitioning tz fix 2024-11-05 03:44:07 -08: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
Simon Cruanes
a1349d8776 fix vet warnings 2024-09-22 00:08:07 -04:00
Simon Cruanes
32e13f17ae Apply suggestions from code review
Co-authored-by: flysand7 <yyakut.ac@gmail.com>
2024-09-21 21:08:35 -04:00
Simon Cruanes
d08b3d3b82 add tests for time.time_to_rfc3339 2024-09-21 00:48:39 -04:00
Feoramund
f6f2c67f37 Add time.time_to_datetime 2024-09-03 00:55:09 -04:00
Jeroen van Rijn
9088a493d9 Add time.to_string* formatters. 2024-07-25 19:43:42 +02:00
Jeroen van Rijn
5b1ffba915 Port testing\core\time 2024-06-02 14:47:09 -04:00
Jeroen van Rijn
3526042f1e Add dedicated ISO 8601 parser. 2024-05-24 23:40:14 +02:00
Jeroen van Rijn
e1c4b9b06a Allow lowercase z TZ indicator. 2024-05-24 19:16:24 +02:00
Vitalii Kravchenko
ff94ca9e42 Allow space (in addition to T and t) as RFC 3339 date/time separator. 2024-05-24 18:03:52 +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