time/interop/mod.rs
1//! Comparison, arithmetic, and conversion between various types in `time` and the standard library.
2//!
3//! Currently, full interoperability is present between [`OffsetDateTime`](crate::OffsetDateTime),
4//! [`Timestamp`](crate::Timestamp), [`UtcDateTime`](crate::UtcDateTime), and
5//! [`SystemTime`](std::time::SystemTime). Partial interoperability is present with
6//! [`js_sys::Date`]. Note that [`PrimitiveDateTime`](crate::PrimitiveDateTime) is not interoperable
7//! with any of these types due to the lack of an associated UTC offset.
8
9// Module names should have the two types sorted in alphabetical order. This avoids any question
10// of which type should be the "primary" type in the module name.
11
12#[cfg(all(
13 target_family = "wasm",
14 not(any(target_os = "emscripten", target_os = "wasi")),
15 feature = "wasm-bindgen"
16))]
17mod js_sys_date_offsetdatetime;
18#[cfg(all(
19 target_family = "wasm",
20 not(any(target_os = "emscripten", target_os = "wasi")),
21 feature = "wasm-bindgen"
22))]
23mod js_sys_date_timestamp;
24#[cfg(all(
25 target_family = "wasm",
26 not(any(target_os = "emscripten", target_os = "wasi")),
27 feature = "wasm-bindgen"
28))]
29mod js_sys_date_utcdatetime;
30#[cfg(feature = "std")]
31mod offsetdatetime_systemtime;
32mod offsetdatetime_timestamp;
33mod offsetdatetime_utcdatetime;
34#[cfg(feature = "std")]
35mod systemdatetime_timestamp;
36mod timestamp_utcdatetime;
37#[cfg(feature = "std")]
38mod utcdatetime_systemtime;