Commit Graph

25 Commits

Author SHA1 Message Date
Nathan Fisher 10fe374ea7 Add new `toTimestampNaive` method on `DateTime` so that weekday calculations can be performed for local time rather than for UTC 2024-01-30 00:30:45 -05:00
Nathan Fisher 8f4f120a3b Merge branch 'odin' of git.hitchhiker-linux.org:jeang3nie/zig-chrono into odin 2024-01-29 23:35:52 -05:00
Nathan Fisher 95c8113136 Miscellaneous fixes 2024-01-29 23:05:44 -05:00
Nathan Fisher 2d2b99c954 Bring up to zig 0.11 2023-09-10 18:30:09 -04:00
Nathan Fisher 9547839328 Move tests into tests module 2023-06-13 20:37:17 -04:00
Nathan Fisher 1b56c10dc2 Add `format_basic` method to format as ISO-8601 without field separators 2023-06-13 20:30:56 -04:00
Nathan Fisher 54251ea116 Add custom format functions to print as ISO-8601 datetime 2023-06-13 20:01:34 -04:00
Nathan Fisher 8ab36acb45 Split off `timezone` module 2023-06-13 16:05:33 -04:00
Nathan Fisher 2578b0f4fa Move `Month` into module 2023-06-13 15:54:28 -04:00
Nathan Fisher 61757c9336 Move `Year` into module 2023-06-13 15:50:45 -04:00
Nathan Fisher 536228c9ee Add `now` method and test 2023-06-13 15:41:48 -04:00
Nathan Fisher 20afb68910 Add fromTimestamp and improved testing coverage and feedback 2023-06-13 15:32:20 -04:00
Nathan Fisher c79292181a Add DateTime.compare for comparisons and ordering 2023-06-13 12:22:59 -04:00
Nathan Fisher 66b9e61ed4 Fix error which crept in due to daylight savings and me being dumb
(clever).
2023-06-13 11:35:57 -04:00
Nathan Fisher d9214443a8 Add some comments 2023-06-13 02:12:26 -04:00
Nathan Fisher c4207f940c Added another weekday test 2023-06-13 02:07:52 -04:00
Nathan Fisher 496970583d Add `getWeekday` function 2023-06-13 02:06:19 -04:00
Nathan Fisher 0fe32ca124 Renamed library to chrono 2023-06-13 01:46:34 -04:00
Nathan Fisher c5356568aa Simplify applying offset 2023-06-13 01:40:56 -04:00
Nathan Fisher fb6f60d4ec Remove nanos field 2023-06-13 01:36:44 -04:00
Nathan Fisher f4c138b2a4 Got conversion to timestamp working and passing tests 2023-06-13 01:35:05 -04:00
Nathan Fisher 7bfdd02688 Add `toTimestamp` method, fix function naming to match Zig conventions 2023-06-13 00:58:55 -04:00
Nathan Fisher e0f4e003d2 Remove pub from HoursMinutes struct 2023-06-13 00:23:05 -04:00
Nathan Fisher 2abed40946 Allow for minutes in TimeZone offsets 2023-06-13 00:21:36 -04:00
Nathan Fisher 2029bf3778 Initial commit 2023-06-12 22:59:12 -04:00