Only the proleptic Gregorian calendar (i.e. extended to support older dates) is supported.
Date types are limited to about +/- 262,000 years from the common epoch.
Time types are limited to nanosecond accuracy.
Leap seconds can be represented, but Chrono does not fully support them.
See Leap Second Handling.
Crate features
Default features:
alloc: Enable features that depend on allocation (primarily string formatting).
std: Enables functionality that depends on the standard library. This is a superset of alloc
and adds interoperation with standard library types and traits.
clock: Enables reading the local timezone (Local). This is a superset of now.
now: Enables reading the system time (now).
wasmbind: Interface with the JS Date API for the wasm32 target.
Optional features:
serde: Enable serialization/deserialization via serde.
rkyv: Deprecated, use the rkyv-* features.
rkyv-16: Enable serialization/deserialization via rkyv, using 16-bit integers for integral *size types.
rkyv-32: Enable serialization/deserialization via rkyv, using 32-bit integers for integral *size types.
rkyv-64: Enable serialization/deserialization via rkyv, using 64-bit integers for integral *size types.
rkyv-validation: Enable rkyv validation support using bytecheck.
arbitrary: Construct arbitrary instances of a type with the Arbitrary crate.
unstable-locales: Enable localization. This adds various methods with a _localized suffix.
The implementation and API may change or even be removed in a patch release. Feedback welcome.
oldtime: This feature no longer has any effect; it used to offer compatibility with the time 0.1 crate.
Note: The rkyv{,-16,-32,-64} features are mutually exclusive.
Rust version requirements
The Minimum Supported Rust Version (MSRV) is currently Rust 1.62.0.
The MSRV is explicitly tested in CI. It may be bumped in minor releases, but this is not done
lightly.