Sylvestre Ledru
e9b8f7a43e
Deduplicate test helpers using Display and expect_in_range
...
Replace hand-rolled format_offset_colon / format_for_assert helpers
with the new Display impls. Replace local expect_in_range_datetime
test helpers with ParsedDateTime::expect_in_range().
2026-04-01 10:26:21 +02:00
abhishekpradhan
ee4971cc73
Add extended runtime + ParsedDateTime API for large years ( #263 )
2026-03-31 09:51:07 +02:00
Sylvestre Ledru
002ca41008
tests: add edge case tests for 0 years and 0 months
...
Add tests to verify that adding 0 years or 0 months returns the
original date unchanged, including edge cases with Feb 29.
2026-02-14 18:19:31 +01:00
Sylvestre Ledru
818cfa4ad0
date: add more tests for cross-TZ-mishandled test - embedded timezone
...
NOTE: This commit only adds tests as the implementation was already
working correctly. These tests document and verify the expected
behavior for the embedded timezone edge case referenced in Debian
bug #851934 .
2026-02-14 18:19:31 +01:00
Sylvestre Ledru
5cf8a6fbdd
date: add more tests leap year overflow
2026-02-14 18:19:31 +01:00
cerdelen
14bbd4e848
parse_datetime: relative Year overflow for leap years
2026-02-14 11:21:39 +01:00
cerdelen
dbfdea454f
parse_datetime: Remove unnessecary import
2026-02-14 11:21:39 +01:00
cerdelen
7e528ad609
parse_datetime: Implement GNU style overflow/underflow
...
In GNU if using date with relative Months with the -d flag and the target Month does not have the source day (for example 31) GNU overflows the diff in days.
2026-02-14 11:21:39 +01:00
cerdelen
6306843888
parse_datetime: add regression tests
2026-02-14 11:21:39 +01:00
Chris Dryden
642bbbf214
Merge pull request #255 from ChrisDryden/fix-tz-prefix-with-base-date
...
fix: TZ prefix should override base date timezone
2026-02-12 09:29:36 +01:00
Nicholas Still
3074fe3baa
Change ErrMode::Cut to ErrMode::Backtrack to allow alt parser flow
2025-10-04 16:55:43 +02:00
yuankunzhang
84d27e6386
fix: support timezone offsets that exceed 24-hour range
2025-08-24 19:08:48 +08:00
yuankunzhang
ae25053473
refactor: replace chrono with jiff
2025-08-20 11:44:58 +08:00
Sylvestre Ledru
b68c325abd
Merge pull request #162 from cakebaker/set_timezone_for_tests
...
tests: set timezone to `UTC0` in integration tests
2025-08-01 08:25:18 +02:00
yuankunzhang
8bebfab576
fix: time offset can only appear after time or timezone
2025-07-19 13:57:46 +00:00
Daniel Hofstetter
6e6ffc2dff
tests: set timezone to UTC0 in integration tests
2025-07-16 10:13:20 +02:00
yuankunzhang
0b5d3ffdf3
fix: hour must be greater than 0 when meridiem is specified
2025-06-28 16:48:09 +02:00
yuankunzhang
c0ada32ce1
feat: support nanoseconds
2025-06-28 16:30:24 +02:00
Maxim
856a13ddb2
test: Integration tests for date parsing
2025-06-25 05:15:41 +00:00
Sylvestre Ledru
f1f2c47120
Merge pull request #163 from cakebaker/tests_fix_typos
...
tests: fix typos
2025-06-24 14:47:21 +02:00
Daniel Hofstetter
937572d557
tests: add license header to integration tests
2025-06-24 14:43:56 +02:00
Daniel Hofstetter
a7d9d1ab59
tests: fix typos
...
aphabetical -> alphabetical, ommititing -> omitting
2025-06-24 13:55:37 +02:00
Maxim
7260b0ae73
test: Integration tests for date parsing
2025-06-20 09:16:48 +00:00
Maxim
92daee09de
chore: Remove empty source file
2025-06-20 15:31:40 +09:00
Patrick Klitzke
f10749eade
Refactor parse_datetime to only expose parse_datetime function
...
Create new file parse_relative_time.rs with the relative time helper function.
Renames from_str to parse_datetime and parse_relative time.
Adds function parse_datetime_at_date.
2023-08-29 09:03:17 +09:00