Skip to content

date: support GNU-compatible out-of-range years and formatting parity#10931

Draft
abhishekpradhan wants to merge 3 commits intouutils:mainfrom
abhishekpradhan:codex/large-year-date-parity
Draft

date: support GNU-compatible out-of-range years and formatting parity#10931
abhishekpradhan wants to merge 3 commits intouutils:mainfrom
abhishekpradhan:codex/large-year-date-parity

Conversation

@abhishekpradhan
Copy link

Summary

  • accept parse_datetime::ParsedDateTime::{InRange, Extended} in date -d flow
  • add extended-year formatting path for out-of-range years with GNU-compatible output behavior
  • fix timezone conversion for extended dates (-u, local TZ output, explicit input offsets)
  • add support for additional format specifiers on extended dates, including week/year directives (%U, %W, %V, %G, %g)
  • handle extended parse results in touch -d without panic
  • add regression tests for large-year output, DST-aware IANA rules, and formatter parity

Dependency sequencing

Related issues

Testing

  • cargo check -q -p uu_date -p uu_touch
  • cargo test -q --test tests test_date::test_large_year_with_explicit_offset_converts_to_output_timezone -- --nocapture
  • cargo test -q --test tests test_date::test_large_year_supports_r_and_c_formats -- --nocapture
  • cargo test -q --test tests test_date::test_large_year_iana_timezone_rule_uses_dst_in_far_future -- --nocapture
  • cargo test -q --test tests test_date::test_large_year_week_format_specifiers -- --nocapture
  • cargo test -q --test tests test_touch::test_touch_large_year_date_does_not_panic -- --nocapture

@abhishekpradhan
Copy link
Author

Updated this branch to pin parse_datetime to the current top of the split stack:

Current pinned SHA: 0a3b73f51d62e728d354d29bfedbafcf8c1731bd.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 14, 2026

Merging this PR will improve performance by 3%

⚡ 1 improved benchmark
✅ 116 untouched benchmarks
⏩ 209 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation du_summarize_balanced_tree[(5, 4, 10)] 7 ms 6.8 ms +3%

Comparing abhishekpradhan:codex/large-year-date-parity (bb44ef6) with main (42e3ab6)2

Open in CodSpeed

Footnotes

  1. 209 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (def3956) during the generation of this report, so 42e3ab6 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant