pub struct TimePoint(/* private fields */);Expand description
TimePoint
Implementations§
Source§impl TimePoint
impl TimePoint
pub fn new(milliseconds_from_epoc: i64) -> Self
pub fn at_ymd_hms_milli_utc( year: i32, month: u32, day: u32, hour: u32, minute: u32, second: u32, millisecond: u32, ) -> Self
pub fn at_ymd_hms_milli_tz<T>(
year: i32,
month: u32,
day: u32,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
time_zone: T,
) -> Selfwhere
T: TimeZone,
pub fn at_cym_dom_hms_milli_tz<T>(
year_month: CalendarYearMonth,
date: DayOfMonth,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
time_zone: T,
) -> Selfwhere
T: TimeZone,
pub fn at_midnight_cd_utc(calendar_date: CalendarDate) -> Self
pub fn at_midnight_cd_tz<T>(calendar_date: CalendarDate, time_zone: T) -> Selfwhere
T: TimeZone,
pub fn parse_utc( date_time_str: &str, pattern: &str, ) -> Result<TimePoint, ParseError>
pub fn parse_tz<T>(
date_time_str: &str,
pattern: &str,
time_zone: T,
) -> Result<Self, ParseError>where
T: TimeZone,
pub fn milliseconds_from_epoc(&self) -> i64
pub fn to_date_time_utc(&self) -> DateTime<Utc>
pub fn to_date_time<T>(&self, time_zone: T) -> DateTime<T>where
T: TimeZone,
pub fn to_date_utc(&self) -> Date<Utc>
pub fn to_date<T>(&self, time_zone: T) -> Date<T>where
T: TimeZone,
pub fn to_naive_date_time_utc(&self) -> NaiveDateTime
pub fn to_naive_date_time<T>(&self, time_zone: T) -> NaiveDateTimewhere
T: TimeZone,
pub fn to_naive_time_utc(&self) -> NaiveTime
pub fn to_naive_time<T>(&self, time_zone: T) -> NaiveTimewhere
T: TimeZone,
pub fn to_naive_date_utc(&self) -> NaiveDate
pub fn to_naive_date<T>(&self, time_zone: T) -> NaiveDatewhere
T: TimeZone,
pub fn into_calendar_date_utc(self) -> CalendarDate
pub fn into_calendar_date<T>(self, time_zone: T) -> CalendarDatewhere
T: TimeZone,
pub fn to_time_of_day_utc(&self) -> TimeOfDay
pub fn to_time_of_day<T>(&self, time_zone: T) -> TimeOfDaywhere
T: TimeZone,
pub fn add(self, duration: Duration) -> Self
pub fn subtract(self, duration: Duration) -> Self
pub fn next_day(self) -> Self
pub fn is_after(&self, other: &Self) -> bool
pub fn is_before(&self, other: &Self) -> bool
pub fn is_same_day_as_utc(&self, other: &Self) -> bool
pub fn is_same_day_as<T>(&self, other: &Self, time_zone: T) -> boolwhere
T: TimeZone,
Trait Implementations§
Source§impl From<TimePoint> for CalendarDate
impl From<TimePoint> for CalendarDate
Source§impl From<TimePoint> for CalendarYearMonth
impl From<TimePoint> for CalendarYearMonth
Source§impl PartialOrd for TimePoint
impl PartialOrd for TimePoint
impl Eq for TimePoint
impl StructuralPartialEq for TimePoint
Auto Trait Implementations§
impl Freeze for TimePoint
impl RefUnwindSafe for TimePoint
impl Send for TimePoint
impl Sync for TimePoint
impl Unpin for TimePoint
impl UnwindSafe for TimePoint
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