You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: There is no breaking change current planned. This issue is to keep track of things that may happen when there is a breaking change at some undetermined point in the future. Items are in no particular order. This issue is not being updated on a regular basis, as I am using a more detailed approach to tracking items privately.
Potential changes
These are mostly things that I have thought about at some point, with varying levels of certainty.
Eliminate large-dates feature flag. Support years in the range 0..=9999. Given that the Gregorian calendar is multiple days off on either end, there is little use for anything beyond this range, particularly with day-level (or even nanosecond-level) precision. Alternatively, support the range -999999..=999999 unconditionally.
Remove the serde-well-known feature flag, which is already deprecated in favor of using the relevant flags (serde, formatting, and/or parsing) directly.
Simplify error handling. Anonymous enums would be wonderful but are not required. In particular, the large number of conversions should be cut down, as many of them exist when they can already be performed transitively. The amount of information exposed should be restricted to as little as necessary, as this has caused issues in the past.
Remove anything deprecated. This isn't that much and is already largely hidden by default in documentation.
Merge FormatItem and OwnedFormatItem into a single opaque item. Require literals to be valid UTF-8. This is done in version 3 format descriptions.
Remove Copy implementation for Parsed.
Use ranged integers in public APIs. This would currently require adding countless new methods.
Rename Duration to SignedDuration or something else.
Make Duration::seconds generic over i64, f32, and f64. Similarly for saturaturating_seconds_* and checked_seconds_*. Alternatively, have a seconds_float method that is generic while keeping the integer case separate.
Remove Duration::time_fn. This is a carry-over from time 0.1 and was presumably meant as a poor man's benchmarking tool. Instant is not meant to be used in that manner.
Remove time::Instant in favor of an extension trait on std::time::Instant. This would reduce the number of trait implementations needed. The extension trait was added in v0.3.35, with time::Instant being deprecated at the same time.
Change modifiers to be opaque, providing builder methods instead. Builder methods were added in time v0.3.47, with field access being deprecated at the same time.
Merge Formattable and Parsable into a single FormatDescription trait, which will be generic over const FORMATTABLE: bool and const PARSABLE: bool.
Reject nonsensical combinations of modifiers (i.e. a numerical month doesn't care whether it's case sensitive or not)
Support fmt::Write for formatting.
Move time::convert to time::unit and provide additional implementations (potentially useful for generic code). This is partially implemented.
Note: There is no breaking change current planned. This issue is to keep track of things that may happen when there is a breaking change at some undetermined point in the future. Items are in no particular order. This issue is not being updated on a regular basis, as I am using a more detailed approach to tracking items privately.
Potential changes
These are mostly things that I have thought about at some point, with varying levels of certainty.
large-datesfeature flag. Support years in the range0..=9999. Given that the Gregorian calendar is multiple days off on either end, there is little use for anything beyond this range, particularly with day-level (or even nanosecond-level) precision. Alternatively, support the range-999999..=999999unconditionally.serde-well-knownfeature flag, which is already deprecated in favor of using the relevant flags (serde,formatting, and/orparsing) directly.FormatItemandOwnedFormatIteminto a single opaque item. Require literals to be valid UTF-8. This is done in version 3 format descriptions.Copyimplementation forParsed.DurationtoSignedDurationor something else.MakeDuration::secondsgeneric overi64,f32, andf64. Similarly forsaturaturating_seconds_*andchecked_seconds_*. Alternatively, have aseconds_floatmethod that is generic while keeping the integer case separate.Duration::time_fn. This is a carry-over fromtime0.1 and was presumably meant as a poor man's benchmarking tool.Instantis not meant to be used in that manner.time::Instantin favor of an extension trait onstd::time::Instant. This would reduce the number of trait implementations needed. The extension trait was added in v0.3.35, withtime::Instantbeing deprecated at the same time.[optional]and[first](needed for Permit skipping[optional]values when formatting #708). This is done in version 3 format descriptions.Serialize/Deserializeformats to ISO 8601 #672)PrimitiveDateTimetoPlainDateTimetimev0.3.47, with field access being deprecated at the same time.FormattableandParsableinto a singleFormatDescriptiontrait, which will be generic overconst FORMATTABLE: boolandconst PARSABLE: bool.fmt::Writefor formatting.time::converttotime::unitand provide additional implementations (potentially useful for generic code). This is partially implemented.