Skip to content

v0.4.27

Compare
Choose a tag to compare
@pitdicker pitdicker released this 29 Aug 14:01

This release bumps the MSRV from 1.56 to 1.57. This allows us to take advantage of the panicking in const feature. In this release most methods on NaiveDate and NaiveTime are made const, NaiveDateTime and others will follow in a later release.

The parser for the %+ formatting specifier and the RFC3339 formatting item is switched from a strict to a relaxed parser (see #1145). This matches the existing documentation, and the parser used by DateTime::from_str. If you need to validate the input, consider using DateTime::from_rfc3339.

Deprecations

  • Deprecate DateTime::{from_local, from_utc} (#1175)

Additions

  • Let DateTime::signed_duration_since take argument with Borrow (#1119)
  • Implement PartialOrd for Month (#999, thanks @Munksgaard)
  • Add Ord and Eq for types which already derive PartialOrd and PartialEq (#1128, thanks @totikom)
  • implement FusedIterator for NaiveDateDaysIterator and NaiveDateWeeksIterator (#1134)
  • Make NaiveDateDaysIterator and NaiveDateWeeksIterator public (#1134)
  • Add FromStr for FixedOffset (#1157, thanks @mcronce)
  • Remove Tz::Offset: Display requirement from DateTime::to_rfc* (#1160)
  • More flexible offset formatting (not exposed yet) (#1160)
  • Make StrftimeItems with unstable-locales work without allocating (#1152)
  • Make NaiveDate::from_ymd_opt const (#1172, thanks @kamadorueda)
  • Implement Error trait for ParseWeekdayError and ParseMonthError (#539, thanks @mike-kfed)
  • Make methods on NaiveTime const, update MSRV to 1.57 (#1080)
  • Make methods on NaiveDate const (#1205)
  • Implement operations for core::time::Duration on DateTime types (#1229)

Fixes

  • Ensure timestamp_nanos panics on overflow in release builds (#1123)
  • Fix offset_from_local_datetime for wasm_bindgen (#1131)
  • Parsing: Consider %s to be a timestamp in UTC (#1136)
  • Don't panic when formatting with %#z (#1140, thanks @domodwyer)
  • Parsing: allow MINUS SIGN (U+2212) in offset (#1087, thanks @jtmoon79)
  • Fix locale formatting for %c and %r (#1165)
  • Localize decimal point with unstable-locales feature (#1168)
  • Fix panic on macOS 10.12 caused by using version 1 of the TZif file format (#1201, thanks to help from @jfro)
  • Fix deserialization of negative timestamps (#1194)
  • Do not use Offset's Debug impl when serializing DateTime (#1035)
  • Allow missing seconds in NaiveTime::from_str (#1181)
  • Do not depend on android-tzdata if the clock feature is not enabled (#1220, thanks @AlexTMjugador)
  • Small fixes to the RFC 3339 parsers (#1145)

Documentation

  • Add "Errors" and "Panics" sections to API docs (#1120)
  • Specify licenses in SPDX format (#1132, backport of #910, thanks @LingMan)
  • Fix NaiveTime doc typo (#1146, thanks @zachs18)
  • Clarify nanosecond formatting specifier doc (#1173)
  • Add warning against combining multiple Datelike::with_* (#1199)
  • Fix typo "accepted" (#1209, thanks @simon04)
  • Add some examples to Utc::now and Local::now (#1192)
  • Add example to Weekday::num_days_from_monday (#1193)
  • Fix some comments and panic messages (#1221, thanks @umanwizard)

Internal improvements

  • DateTime::to_rfc_* optimizations (#1200)
  • Move all tests into modules, fix clippy warnings (#1138)
  • Offset parsing cleanup (#1158)
  • Factor out formatting to format/formatting.rs (#1156)
  • Format refactorings (#1198)
  • Format toml files with taplo (#1117, thanks @tottoto)
  • Stop vendoring saturating_abs (#1124)
  • CI: shell set -eux, use bash (#1103, thanks @jtmoon79)
  • Fix dead code error when running dateutils test on Windows (#1125)
  • Remove Makefile (#1133)
  • CI: Test wasm-bindgen feature (#1131)
  • Stop using deprecated methods in parse module (#1142)
  • Add formatting benchmarks (#1155)
  • Feature gate tests instead of methods (#1159, #1162)
  • Parallelize try_verify_against_date_command (#1161)
  • CI: also run integration tests with no_std (#1166)
  • Split test_parse (#1170)
  • Remove #![deny(dead_code)] (#1187)
  • Clippy fixes for Rust 1.71 (#1186)
  • Various small improvements (#1191)
  • Add unit test for uncovered regions (#1149, thanks @CXWorks)
  • Don't test the same thing twice in test_date_extreme_offset (#1195)
  • CI: Add workflow code coverage report and upload (#1178, #1215, thanks @jtmoon79)
  • CI: fail on warnings in features-check (#1216)
  • Switch to windows-bindgen (#1202, thanks to help from @MarijnS95)

Thanks to all contributors on behalf of the chrono team, @djc and @pitdicker!