@@ -6,6 +6,48 @@ The format is based on [Keep a Changelog]. This project adheres to [Semantic Ver
66
77---
88
9+ ## 0.3.42 [ 2025-08-31]
10+
11+ ### Added
12+
13+ - ` Time::duration_until `
14+ - ` Time::duration_since `
15+ - ` per_t ` method for all types in ` time::convert ` . This is similar to the existing ` per ` method, but
16+ can return any of the primitive numeric types that can represent the result. This will cut down on
17+ ` as ` casts while ensuring correctness. Type inference isn't perfect, so you may need to provide a
18+ type annotation in some situations.
19+ - ` impl PartialOrd for Month ` and ` impl Ord for Month ` ; this assumes the months are in the same year
20+ - ` SystemTimeExt ` trait, adding methods for checked arithmetic with ` time::Duration ` and obtaining
21+ the difference between two ` SystemTime ` s as a ` time::Duration `
22+ - Permit using ` UtcDateTime ` with ` rand ` (this was inadvertently omitted previously)
23+ - ` impl core::error::Error ` for all error types (now available when the ` std ` feature is disabled)
24+ - MacOS can now obtain the local UTC offset in multi-threaded programs as the system APIs are
25+ thread-safe.
26+ - ` #[track_caller] ` has been added to all relevant methods.
27+
28+ ### Changed
29+
30+ - The dependency on ` itoa ` has been removed, as the standard library now has similar functionality
31+ by default.
32+ - Formatting a component that involves a floating point number is now guaranteed to be
33+ deterministic, avoiding any subtle differences between platforms or compiler versions.
34+
35+ ### Fixed
36+
37+ - Serializing timestamps with nanosecond precision _ should_ always emit the correct value.
38+ Previously, it could be off by one nanosecond due to floating point imprecision.
39+ - A previously unknown bug in ` OffsetDateTime::to_offset ` and ` UtcDateTime::to_offset ` has been
40+ fixed. The bug could result in a value that was invalid. It was unlikely to ever occur in
41+ real-world code, as it involved passing a UTC offset that has never been used in any location.
42+
43+ ### Miscellaneous
44+
45+ - The amount of code generated by macros has been massively reduced, on the order of 65-70% for
46+ typical use cases of ` format_description! ` .
47+ - Significant performance gains for comparisons of ` Time ` , ` PrimitiveDateTime ` , ` UtcDateTime ` , and
48+ ` OffsetDateTime ` . The first three have gains of approximately 85% (i.e. 6× faster).
49+ - Nearly all methods are ` #[inline] ` .
50+
951## 0.3.41 [ 2025-03-23]
1052
1153### Fixed
0 commit comments