-
-
Notifications
You must be signed in to change notification settings - Fork 290
Closed
Labels
A-coreArea: anything not otherwise coveredArea: anything not otherwise coveredA-formattingArea: formattingArea: formattingA-macrosArea: macrosArea: macrosA-parsingArea: parsingArea: parsingC-cleanupCategory: cleanup of existing codeCategory: cleanup of existing codeC-seeking-input 📣Category: community input is desiredCategory: community input is desiredC-tracking-issueCategory: tracking issue for a feature/releaseCategory: tracking issue for a feature/release
Milestone
Description
Time v0.2 was an outstanding learning experience, and by all accounts is a massive improvement over v0.1. However, a number of ill-informed decisions were made which led to some inconsistencies and many deprecated APIs.
All deprecated methods and structs have ready-to-use alternatives, which will be detailed before a release. As such, I would like to remove all deprecated APIs. This currently includes the following.
Deprecated APIs
- v0.1 APIs, currently behind a default feature flag
PreciseTime
SteadyTime
precise_time_ns
precise_time_s
Instant::to
Duration::num_weeks
Duration::num_days
Duration::num_hours
Duration::num_minutes
Duration::num_seconds
Duration::num_milliseconds
Duration::num_microseconds
Duration::num_nanoseconds
Duration::span
Duration::from_std
Duration::to_std
- Panicking APIs, currently behind a non-default feature flag
Date::from_ymd
Date::from_yo
Date::from_iso_ywd
Date::with_hms
Date::with_hms_milli
Date::with_hms_micro
Date::with_hms_nano
Time::from_hms
Time::from_hms_milli
Time::from_hms_micro
Time::from_hms_nano
- APIs that assume an offset of UTC, currently enabled unconditionally
Date::today
Time::now
PrimitiveDateTime::now
PrimitiveDateTime::unix_epoch
PrimitiveDateTime::from_unix_timestamp
PrimitiveDateTime::timestamp
OffsetDateTime::now
- Other APIs that were deprecated during the course of v0.2, currently enabled unconditionally
Sign
Duration::sign
PrimitiveDateTime::using_offset
Goals for v0.3:
Remove all deprecated APIsRevamped parsing/formatting (Revamped parsing/formatting #236)un-constifyis_leap_year
anddays_in_year
for performance. On Rust ≥ 1.46,cfg_if_match
andcfg_loop
are stable, which allows re-enabling this without runtime performance loss. As a result, the only "loss" is un-constifying methods on older compilers.Place macros behind a feature flag.Change a number of methods to returnResult
, including allUtcOffset
constructors.Renametry_from_*
to justfrom_*
.#![no_alloc]
supportRenameOffsetDateTime::timestamp
andOffsetDateTime::timestamp_nanos
toOffsetDateTime::unix_timestamp
andOffsetDateTime::unix_timestamp_nanos
respectively.Stabilize serde representations
Anything stricken on the above list is completed. Anything that was previously on the list but was removed was either done in 0.2 (if it's not a breaking change) or abandoned.
archseer, mkroening, KodrAus, reneherrero, simonwep and 6 moreharrysarson, simonwep, museun and shirshak55
Metadata
Metadata
Assignees
Labels
A-coreArea: anything not otherwise coveredArea: anything not otherwise coveredA-formattingArea: formattingArea: formattingA-macrosArea: macrosArea: macrosA-parsingArea: parsingArea: parsingC-cleanupCategory: cleanup of existing codeCategory: cleanup of existing codeC-seeking-input 📣Category: community input is desiredCategory: community input is desiredC-tracking-issueCategory: tracking issue for a feature/releaseCategory: tracking issue for a feature/release