pub struct DateTimeIsOwned<const OWNED: bool>(/* private fields */);Expand description
wxDateTime class represents an absolute moment in time.
DateTimerepresents a C++wxDateTimeclass instance which your code has ownership,DateTimeIsOwned<false>represents one which don’t own.- Use
DateTime’snew()to create an instance of this class. - See C++
wxDateTimeclass’s documentation for more details.
Implementations§
Source§impl<const OWNED: bool> DateTimeIsOwned<OWNED>
impl<const OWNED: bool> DateTimeIsOwned<OWNED>
pub const Local: c_int = 0
pub const GMT_12: c_int
pub const GMT_11: c_int
pub const GMT_10: c_int
pub const GMT_9: c_int
pub const GMT_8: c_int
pub const GMT_7: c_int
pub const GMT_6: c_int
pub const GMT_5: c_int
pub const GMT_4: c_int
pub const GMT_3: c_int
pub const GMT_2: c_int
pub const GMT_1: c_int
pub const GMT0: c_int
pub const GMT1: c_int
pub const GMT2: c_int
pub const GMT3: c_int
pub const GMT4: c_int
pub const GMT5: c_int
pub const GMT6: c_int
pub const GMT7: c_int
pub const GMT8: c_int
pub const GMT9: c_int
pub const GMT10: c_int
pub const GMT11: c_int
pub const GMT12: c_int
pub const GMT13: c_int
pub const Gregorian: c_int = 0
pub const Julian: c_int
pub const Country_Unknown: c_int = 0
pub const Country_Default: c_int
pub const Country_WesternEurope_Start: c_int
pub const Jan: c_int = 0
pub const Feb: c_int
pub const Mar: c_int
pub const Apr: c_int
pub const May: c_int
pub const Jun: c_int
pub const Jul: c_int
pub const Aug: c_int
pub const Sep: c_int
pub const Oct: c_int
pub const Nov: c_int
pub const Dec: c_int
pub const Inv_Month: c_int
pub const Sun: c_int = 0
pub const Mon: c_int
pub const Tue: c_int
pub const Wed: c_int
pub const Thu: c_int
pub const Fri: c_int
pub const Sat: c_int
pub const Inv_WeekDay: c_int
pub const Name_Full: c_int = 0x01
pub const Name_Abbr: c_int = 0x02
pub const Default_First: c_int = 0
pub const Monday_First: c_int
pub const Sunday_First: c_int
Sourcepub fn new() -> DateTimeIsOwned<OWNED>
pub fn new() -> DateTimeIsOwned<OWNED>
Default constructor.
Sourcepub fn new_with_datetime<D: DateTimeMethods>(date: &D) -> DateTimeIsOwned<OWNED>
pub fn new_with_datetime<D: DateTimeMethods>(date: &D) -> DateTimeIsOwned<OWNED>
Copy constructor.
Sourcepub fn new_with_double(jdn: c_double) -> DateTimeIsOwned<OWNED>
pub fn new_with_double(jdn: c_double) -> DateTimeIsOwned<OWNED>
Same as Set().
pub fn none() -> Option<&'static Self>
Trait Implementations§
Source§impl Clone for DateTimeIsOwned<false>
impl Clone for DateTimeIsOwned<false>
Source§impl<const OWNED: bool> DateTimeMethods for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> DateTimeMethods for DateTimeIsOwned<OWNED>
Source§fn reset_time(&self) -> &Self
fn reset_time(&self) -> &Self
Reset time to midnight (00:00:00) without changing the date. Read more
Source§fn set_tm(&self, tm: *const c_void) -> &Self
fn set_tm(&self, tm: *const c_void) -> &Self
Sets the date and time from the broken down representation in the wxDateTime::Tm structure. Read more
Source§fn set_double(&self, jdn: c_double) -> &Self
fn set_double(&self, jdn: c_double) -> &Self
Sets the date from the so-called Julian Day Number. Read more
Source§fn set_to_current(&self) -> &Self
fn set_to_current(&self) -> &Self
Sets the date and time of to the current values. Read more
Source§fn set_year(&self, year: c_int) -> &Self
fn set_year(&self, year: c_int) -> &Self
Sets the year without changing other date components. Read more
Source§fn set_from_msw_sys_time(&self, st: *const c_void) -> &Self
fn set_from_msw_sys_time(&self, st: *const c_void) -> &Self
Initialize using the Windows SYSTEMTIME structure. Read more
Source§fn get_as_msw_sys_time(&self, st: *mut c_void)
fn get_as_msw_sys_time(&self, st: *mut c_void)
Returns the date and time in the Windows SYSTEMTIME format. Read more
Source§fn get_century_timezone(&self, tz: *const c_void) -> c_int
fn get_century_timezone(&self, tz: *const c_void) -> c_int
Returns the century of this date. Read more
Source§fn get_date_only(&self) -> DateTime
fn get_date_only(&self) -> DateTime
Returns the object having the same date component as this one but time of 00:00:00. Read more
Source§fn get_week_based_year(&self, tz: *const c_void) -> c_int
fn get_week_based_year(&self, tz: *const c_void) -> c_int
Returns the year to which the week containing this date belongs. Read more
Source§fn get_year(&self, tz: *const c_void) -> c_int
fn get_year(&self, tz: *const c_void) -> c_int
Returns the year in the given timezone (local one by default). Read more
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Returns true if the object represents a valid time moment. Read more
Source§fn is_earlier_than<D: DateTimeMethods>(&self, datetime: &D) -> bool
fn is_earlier_than<D: DateTimeMethods>(&self, datetime: &D) -> bool
Returns true if this date precedes the given one. Read more
Source§fn is_equal_to<D: DateTimeMethods>(&self, datetime: &D) -> bool
fn is_equal_to<D: DateTimeMethods>(&self, datetime: &D) -> bool
Returns true if the two dates are strictly identical. Read more
Source§fn is_equal_up_to<D: DateTimeMethods>(&self, dt: &D, ts: *const c_void) -> bool
fn is_equal_up_to<D: DateTimeMethods>(&self, dt: &D, ts: *const c_void) -> bool
Returns true if the date is equal to another one up to the given time interval, i.e. if the absolute difference between the two dates is less than this interval. Read more
Source§fn is_later_than<D: DateTimeMethods>(&self, datetime: &D) -> bool
fn is_later_than<D: DateTimeMethods>(&self, datetime: &D) -> bool
Returns true if this date is later than the given one. Read more
Source§fn is_same_date<D: DateTimeMethods>(&self, dt: &D) -> bool
fn is_same_date<D: DateTimeMethods>(&self, dt: &D) -> bool
Returns true if the date is the same without comparing the time parts. Read more
Source§fn is_same_time<D: DateTimeMethods>(&self, dt: &D) -> bool
fn is_same_time<D: DateTimeMethods>(&self, dt: &D) -> bool
Returns true if the time is the same (although dates may differ). Read more
Source§fn is_strictly_between<D: DateTimeMethods, D2: DateTimeMethods>(
&self,
t1: &D,
t2: &D2,
) -> bool
fn is_strictly_between<D: DateTimeMethods, D2: DateTimeMethods>( &self, t1: &D, t2: &D2, ) -> bool
Returns true if this date lies strictly between the two given dates. Read more
Source§fn is_between<D: DateTimeMethods, D2: DateTimeMethods>(
&self,
t1: &D,
t2: &D2,
) -> bool
fn is_between<D: DateTimeMethods, D2: DateTimeMethods>( &self, t1: &D, t2: &D2, ) -> bool
Returns true if IsStrictlyBetween() is true or if the date is equal to one of the limit values. Read more
Source§fn add_datespan(&self, diff: *const c_void) -> &Self
fn add_datespan(&self, diff: *const c_void) -> &Self
Adds the given date span to this object. Read more
Source§fn add_timespan(&self, diff: *const c_void) -> &Self
fn add_timespan(&self, diff: *const c_void) -> &Self
Adds the given time span to this object. Read more
Source§fn subtract_timespan(&self, diff: *const c_void) -> &Self
fn subtract_timespan(&self, diff: *const c_void) -> &Self
Subtracts the given time span from this object. Read more
Source§fn subtract_datespan(&self, diff: *const c_void) -> &Self
fn subtract_datespan(&self, diff: *const c_void) -> &Self
Subtracts the given date span from this object. Read more
Source§fn format(&self, format: &str, tz: *const c_void) -> String
fn format(&self, format: &str, tz: *const c_void) -> String
This function does the same as the standard ANSI C strftime(3) function (http://www.cplusplus.com/reference/clibrary/ctime/strftime.html). Read more
Source§fn format_date(&self) -> String
fn format_date(&self) -> String
Identical to calling Format() with “%x” argument (which means “preferred date representation for the current locale”). Read more
Source§fn format_iso_date(&self) -> String
fn format_iso_date(&self) -> String
This function returns the date representation in the ISO 8601 format “YYYY-MM-DD”. Read more
Source§fn format_iso_time(&self) -> String
fn format_iso_time(&self) -> String
This function returns the time representation in the ISO 8601 format “HH:MM:SS”. Read more
Source§fn format_time(&self) -> String
fn format_time(&self) -> String
Identical to calling Format() with “%X” argument (which means “preferred time representation for the current locale”). Read more
Source§fn parse_date_time(&self, datetime: &str, end: *mut c_void) -> bool
fn parse_date_time(&self, datetime: &str, end: *mut c_void) -> bool
Parses the string datetime containing the date and time in free format. Read more
Source§fn parse_format<D: DateTimeMethods>(
&self,
date: &str,
format: &str,
date_def: &D,
end: *mut c_void,
) -> bool
fn parse_format<D: DateTimeMethods>( &self, date: &str, format: &str, date_def: &D, end: *mut c_void, ) -> bool
This function parses the string date according to the given format. Read more
Source§fn parse_iso_date(&self, date: &str) -> bool
fn parse_iso_date(&self, date: &str) -> bool
This function parses the date in ISO 8601 format “YYYY-MM-DD”. Read more
Source§fn parse_iso_time(&self, date: &str) -> bool
fn parse_iso_time(&self, date: &str) -> bool
This function parses the time in ISO 8601 format “HH:MM:SS”. Read more
Source§fn parse_rfc822_date(&self, date: &str, end: *mut c_void) -> bool
fn parse_rfc822_date(&self, date: &str, end: *mut c_void) -> bool
Parses the string date looking for a date formatted according to the RFC 822 in it. Read more
Source§fn parse_time(&self, time: &str, end: *mut c_void) -> bool
fn parse_time(&self, time: &str, end: *mut c_void) -> bool
This functions is like ParseDateTime(), but only allows the time to be specified in the input string. Read more
Source§fn get_julian_day_number(&self) -> c_double
fn get_julian_day_number(&self) -> c_double
Returns the JDN corresponding to this date. Read more
Source§fn get_modified_julian_day_number(&self) -> c_double
fn get_modified_julian_day_number(&self) -> c_double
Returns the “Modified Julian Day Number” (MJD) which is, by definition, is equal to JDN - 2400000.5. Read more
Source§fn get_rata_die(&self) -> c_double
fn get_rata_die(&self) -> c_double
Return the Rata Die number of this date. Read more
Source§fn from_timezone(&self, tz: *const c_void, no_dst: bool) -> DateTime
fn from_timezone(&self, tz: *const c_void, no_dst: bool) -> DateTime
Transform the date from the given time zone to the local one. Read more
Source§fn make_from_timezone(&self, tz: *const c_void, no_dst: bool) -> &Self
fn make_from_timezone(&self, tz: *const c_void, no_dst: bool) -> &Self
Same as FromTimezone() but modifies the object in place. Read more
Source§fn make_timezone(&self, tz: *const c_void, no_dst: bool) -> &Self
fn make_timezone(&self, tz: *const c_void, no_dst: bool) -> &Self
Modifies the object in place to represent the date in another time zone. Read more
Source§fn make_utc(&self, no_dst: bool) -> &Self
fn make_utc(&self, no_dst: bool) -> &Self
This is the same as calling MakeTimezone() with the argument GMT0. Read more
Source§fn to_timezone(&self, tz: *const c_void, no_dst: bool) -> DateTime
fn to_timezone(&self, tz: *const c_void, no_dst: bool) -> DateTime
Transform the date to the given time zone. Read more
Source§fn to_utc(&self, no_dst: bool) -> DateTime
fn to_utc(&self, no_dst: bool) -> DateTime
This is the same as calling ToTimezone() with the argument GMT0. Read more
Source§fn convert_year_to_bc(year: c_int) -> c_int
fn convert_year_to_bc(year: c_int) -> c_int
Converts the year in absolute notation (i.e. a number which can be negative, positive or zero) to the year in BC/AD notation. Read more
Source§fn get_am_pm_strings(am: *mut c_void, pm: *mut c_void)
fn get_am_pm_strings(am: *mut c_void, pm: *mut c_void)
Returns the translations of the strings AM and PM used for time formatting for the current locale. Read more
Source§fn get_century_int(year: c_int) -> c_int
fn get_century_int(year: c_int) -> c_int
Get the current century, i.e. first two digits of the year, in given calendar (only Gregorian is currently supported). Read more
Source§fn get_first_week_day(first_day: *mut c_void) -> bool
fn get_first_week_day(first_day: *mut c_void) -> bool
Acquires the first weekday of a week based on locale and/or OS settings. Read more
Source§fn now() -> DateTime
fn now() -> DateTime
Returns the object corresponding to the current time in local time zone. Read more
Source§impl<const OWNED: bool> DateTimeMethodsManual for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> DateTimeMethodsManual for DateTimeIsOwned<OWNED>
Source§impl<const OWNED: bool> Drop for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> Drop for DateTimeIsOwned<OWNED>
Source§impl<const OWNED: bool> WxRustMethods for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> WxRustMethods for DateTimeIsOwned<OWNED>
type Unowned = DateTimeIsOwned<false>
unsafe fn as_ptr(&self) -> *mut c_void
unsafe fn from_ptr(ptr: *mut c_void) -> Self
unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned
unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)
unsafe fn option_from(ptr: *mut c_void) -> Option<Self::Unowned>where
Self: Sized,
Auto Trait Implementations§
impl<const OWNED: bool> Freeze for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> RefUnwindSafe for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> !Send for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> !Sync for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> Unpin for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> UnsafeUnpin for DateTimeIsOwned<OWNED>
impl<const OWNED: bool> UnwindSafe for DateTimeIsOwned<OWNED>
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