Struct DateTimeIsOwned

Source
pub struct DateTimeIsOwned<const OWNED: bool>(/* private fields */);
Expand description

wxDateTime class represents an absolute moment in time.

Implementations§

Source§

impl<const OWNED: bool> DateTimeIsOwned<OWNED>

Source

pub const Local: c_int = 0i32

Source

pub const GMT_12: c_int = 1i32

Source

pub const GMT_11: c_int = 2i32

Source

pub const GMT_10: c_int = 3i32

Source

pub const GMT_9: c_int = 4i32

Source

pub const GMT_8: c_int = 5i32

Source

pub const GMT_7: c_int = 6i32

Source

pub const GMT_6: c_int = 7i32

Source

pub const GMT_5: c_int = 8i32

Source

pub const GMT_4: c_int = 9i32

Source

pub const GMT_3: c_int = 10i32

Source

pub const GMT_2: c_int = 11i32

Source

pub const GMT_1: c_int = 12i32

Source

pub const GMT0: c_int = 13i32

Source

pub const GMT1: c_int = 14i32

Source

pub const GMT2: c_int = 15i32

Source

pub const GMT3: c_int = 16i32

Source

pub const GMT4: c_int = 17i32

Source

pub const GMT5: c_int = 18i32

Source

pub const GMT6: c_int = 19i32

Source

pub const GMT7: c_int = 20i32

Source

pub const GMT8: c_int = 21i32

Source

pub const GMT9: c_int = 22i32

Source

pub const GMT10: c_int = 23i32

Source

pub const GMT11: c_int = 24i32

Source

pub const GMT12: c_int = 25i32

Source

pub const GMT13: c_int = 26i32

Source

pub const Gregorian: c_int = 0i32

Source

pub const Julian: c_int = 1i32

Source

pub const Country_Unknown: c_int = 0i32

Source

pub const Country_Default: c_int = 1i32

Source

pub const Country_WesternEurope_Start: c_int = 2i32

Source

pub const Jan: c_int = 0i32

Source

pub const Feb: c_int = 1i32

Source

pub const Mar: c_int = 2i32

Source

pub const Apr: c_int = 3i32

Source

pub const May: c_int = 4i32

Source

pub const Jun: c_int = 5i32

Source

pub const Jul: c_int = 6i32

Source

pub const Aug: c_int = 7i32

Source

pub const Sep: c_int = 8i32

Source

pub const Oct: c_int = 9i32

Source

pub const Nov: c_int = 10i32

Source

pub const Dec: c_int = 11i32

Source

pub const Inv_Month: c_int = 12i32

Source

pub const Sun: c_int = 0i32

Source

pub const Mon: c_int = 1i32

Source

pub const Tue: c_int = 2i32

Source

pub const Wed: c_int = 3i32

Source

pub const Thu: c_int = 4i32

Source

pub const Fri: c_int = 5i32

Source

pub const Sat: c_int = 6i32

Source

pub const Inv_WeekDay: c_int = 7i32

Source

pub const Name_Full: c_int = 1i32

Source

pub const Name_Abbr: c_int = 2i32

Source

pub const Default_First: c_int = 0i32

Source

pub const Monday_First: c_int = 1i32

Source

pub const Sunday_First: c_int = 2i32

Source

pub fn new() -> DateTimeIsOwned<OWNED>

Source

pub fn new_with_datetime<D: DateTimeMethods>(date: &D) -> DateTimeIsOwned<OWNED>

Source

pub fn new_with_double(jdn: c_double) -> DateTimeIsOwned<OWNED>

Source

pub fn none() -> Option<&'static Self>

Trait Implementations§

Source§

impl Clone for DateTimeIsOwned<false>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<const OWNED: bool> DateTimeMethods for DateTimeIsOwned<OWNED>

Source§

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

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

Sets the date from the so-called Julian Day Number. Read more
Source§

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

Sets the year without changing other date components. Read more
Source§

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)

Returns the date and time in the Windows SYSTEMTIME format. Read more
Source§

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

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

Returns the year to which the week containing this date belongs. Read more
Source§

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

Returns true if the object represents a valid time moment. Read more
Source§

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

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

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

Returns true if this date is later than the given one. Read more
Source§

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

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

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

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

Adds the given date span to this object. Read more
Source§

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

Subtracts the given time span from this object. Read more
Source§

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

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

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

This function returns the date representation in the ISO 8601 format “YYYY-MM-DD”. Read more
Source§

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

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

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

This function parses the string date according to the given format. Read more
Source§

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

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

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

This functions is like ParseDateTime(), but only allows the time to be specified in the input string. Read more
Source§

fn get_jdn(&self) -> c_double

Synonym for GetJulianDayNumber(). Read more
Source§

fn get_julian_day_number(&self) -> c_double

Returns the JDN corresponding to this date. Read more
Source§

fn get_mjd(&self) -> c_double

Synonym for GetModifiedJulianDayNumber(). Read more
Source§

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

Return the Rata Die number of this date. Read more
Source§

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

Same as FromTimezone() but modifies the object in place. Read more
Source§

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

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

Transform the date to the given time zone. Read more
Source§

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

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)

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

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_tm_now() -> *mut c_void

Returns the current time broken down. Read more
Source§

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

Returns the object corresponding to the current time in local time zone. Read more
Source§

fn today() -> DateTime

Returns the object corresponding to the midnight of the current day (i.e. the same as Now(), but the time part is set to 0). Read more
Source§

fn u_now() -> DateTime

Returns the object corresponding to the current time including the milliseconds. Read more
Source§

impl<const OWNED: bool> DateTimeMethodsManual for DateTimeIsOwned<OWNED>

Source§

fn parse_date(&self, date: &str) -> Option<usize>

Source§

impl<const OWNED: bool> Drop for DateTimeIsOwned<OWNED>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<const OWNED: bool> WxRustMethods for DateTimeIsOwned<OWNED>

Source§

type Unowned = DateTimeIsOwned<false>

Source§

unsafe fn as_ptr(&self) -> *mut c_void

Source§

unsafe fn from_ptr(ptr: *mut c_void) -> Self

Source§

unsafe fn from_unowned_ptr(ptr: *mut c_void) -> Self::Unowned

Source§

unsafe fn with_ptr<F: Fn(&Self)>(ptr: *mut c_void, closure: F)

Source§

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> UnwindSafe for DateTimeIsOwned<OWNED>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.