pub struct DateTime {
pub date: Date,
pub time: Time,
}Expand description
Data e hora.
Fields§
§date: Date§time: TimeImplementations§
Source§impl DateTime
impl DateTime
pub fn new(date: Date, time: Time) -> Self
Sourcepub fn parse_iso(text: &str) -> Option<DateTime>
pub fn parse_iso(text: &str) -> Option<DateTime>
Lê yyyy-mm-ddThh:nn:ss (ou com espaço no lugar do T, com fração de segundo). Com
fuso (Z, -03:00, +0530), o instante vira o horário local desta tela: um backend
que manda 13:00:00Z mostra 10:00 em Brasília. O fuso nunca é ignorado.
Sourcepub fn from_unix(secs: i64, millisecond: u16) -> Option<DateTime>
pub fn from_unix(secs: i64, millisecond: u16) -> Option<DateTime>
A data e a hora (sem fuso) de secs segundos desde 1970.
Trait Implementations§
impl Copy for DateTime
impl Eq for DateTime
Source§impl Ord for DateTime
impl Ord for DateTime
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for DateTime
impl PartialOrd for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl Forget for DateTime
impl Freeze for DateTime
impl Move for DateTime
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnsafeUnpin for DateTime
impl UnwindSafe for DateTime
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