pub struct Date { /* fields omitted */ }
Expand description
The equivalent to a JavaScript Date
Object.
let now = Date::now();
let millis = now.as_millis();
let t1: Date = DateInit::Millis(1630611511000).into();
let t2: Date = DateInit::String("Thu, 02 Sep 2021 19:38:31 GMT".to_string()).into();
Create a new Date, which requires being initialized from a known DateInit value.
Get the current time, represented by a Date.
Convert a Date into its number of milliseconds since the Unix epoch.
Formats the value using the given formatter. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Converts the given value to a String
. Read more
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.