pub struct Date { /* private fields */ }
Expand description
The equivalent to a JavaScript Date
Object.
let now = Date::now();
let millis = now.as_millis();
// or use a specific point in time:
let t1: Date = DateInit::Millis(1630611511000).into();
let t2: Date = DateInit::String("Thu, 02 Sep 2021 19:38:31 GMT".to_string()).into();
Implementations§
Trait Implementations§
source§impl PartialEq for Date
impl PartialEq for Date
impl Eq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl !Send for Date
impl !Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more