pub enum DateFormat {
RFC3339,
RFC2822,
HTTP,
SQL,
US,
European,
ShortDate,
LongDate,
ShortTime,
LongTime,
DateTime,
Custom(&'static str),
}
Expand description
Format types for common date strings
This enum provides common date and time format patterns.
Variants§
RFC3339
RFC 3339 (similar to ISO 8601) format: “2025-05-20T14:30:45Z” or “2025-05-20T14:30:45-05:00”
RFC2822
RFC 2822 format: “Tue, 20 May 2025 14:30:45 -0500”
HTTP
HTTP format (RFC 7231): “Tue, 20 May 2025 14:30:45 GMT”
SQL
SQL format: “2025-05-20 14:30:45”
US
US date format: “05/20/2025 02:30:45 PM”
European
European date format: “20/05/2025 14:30:45”
ShortDate
Short date: “05/20/25”
LongDate
Long date: “Tuesday, May 20, 2025”
ShortTime
Short time: “14:30”
LongTime
Long time: “14:30:45”
DateTime
Date and time: “2025-05-20 14:30:45”
Custom(&'static str)
Custom format string
Trait Implementations§
Source§impl Clone for DateFormat
impl Clone for DateFormat
Source§fn clone(&self) -> DateFormat
fn clone(&self) -> DateFormat
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DateFormat
impl Debug for DateFormat
Source§impl Hash for DateFormat
impl Hash for DateFormat
Source§impl PartialEq for DateFormat
impl PartialEq for DateFormat
impl Copy for DateFormat
impl Eq for DateFormat
impl StructuralPartialEq for DateFormat
Auto Trait Implementations§
impl Freeze for DateFormat
impl RefUnwindSafe for DateFormat
impl Send for DateFormat
impl Sync for DateFormat
impl Unpin for DateFormat
impl UnwindSafe for DateFormat
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