Struct qt_core::DateFormat

source ·
pub struct DateFormat(/* private fields */);
Expand description

Note: For ISODate formats, each Y, M and D represents a single digit of the year, month and day used to specify the date. Each H, M and S represents a single digit of the hour, minute and second used to specify the time. The presence of a literal T character is used to separate the date and time when both are specified.

C++ enum: Qt::DateFormat.

C++ documentation:

Note: For ISODate formats, each Y, M and D represents a single digit of the year, month and day used to specify the date. Each H, M and S represents a single digit of the hour, minute and second used to specify the time. The presence of a literal T character is used to separate the date and time when both are specified.

Implementations§

source§

impl DateFormat

source

pub fn to_int(&self) -> c_int

source§

impl DateFormat

source

pub const TextDate: DateFormat = _

The default Qt format, which includes the day and month name, the day number in the month, and the year in full. The day and month names will be short, localized names. This is basically equivalent to using the date format string, “ddd MMM d yyyy”. See QDate::toString() for more information. (C++ enum variant: TextDate = 0)

source

pub const ISODate: DateFormat = _

ISO 8601 extended format: either YYYY-MM-DD for dates or YYYY-MM-DDTHH:mm:ss, YYYY-MM-DDTHH:mm:ssTZD (e.g., 1997-07-16T19:20:30+01:00) for combined dates and times. (C++ enum variant: ISODate = 1)

source

pub const SystemLocaleDate: DateFormat = _

This enum value is deprecated. Use Qt::SystemLocaleShortDate instead (or Qt::SystemLocaleLongDate if you want long dates). (C++ enum variant: SystemLocaleDate = 2)

source

pub const LocalDate: DateFormat = _

This enum value is deprecated. Use Qt::SystemLocaleShortDate instead (or Qt::SystemLocaleLongDate if you want long dates). (C++ enum variant: LocalDate = 2)

source

pub const LocaleDate: DateFormat = _

This enum value is deprecated. Use Qt::DefaultLocaleShortDate instead (or Qt::DefaultLocaleLongDate if you want long dates). (C++ enum variant: LocaleDate = 3)

source

pub const SystemLocaleShortDate: DateFormat = _

The short format used by the operating system. (C++ enum variant: SystemLocaleShortDate = 4)

source

pub const SystemLocaleLongDate: DateFormat = _

The long format used by the operating system. (C++ enum variant: SystemLocaleLongDate = 5)

source

pub const DefaultLocaleShortDate: DateFormat = _

The short format specified by the application’s locale. (C++ enum variant: DefaultLocaleShortDate = 6)

source

pub const DefaultLocaleLongDate: DateFormat = _

The long format used by the application’s locale. (C++ enum variant: DefaultLocaleLongDate = 7)

source

pub const RFC2822Date: DateFormat = _

RFC 2822, RFC 850 and RFC 1036 format: either [ddd,] dd MMM yyyy hh:mm[:ss] +/-TZ or ddd MMM dd yyyy hh:mm[:ss] +/-TZ for combined dates and times. (C++ enum variant: RFC2822Date = 8)

source

pub const ISODateWithMs: DateFormat = _

ISO 8601 extended format, including milliseconds if applicable. (C++ enum variant: ISODateWithMs = 9)

Trait Implementations§

source§

impl Clone for DateFormat

source§

fn clone(&self) -> DateFormat

Returns a copy 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 Debug for DateFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<DateFormat> for c_int

source§

fn from(value: DateFormat) -> Self

Converts to this type from the input type.
source§

impl From<i32> for DateFormat

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for DateFormat

source§

fn eq(&self, other: &DateFormat) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for DateFormat

source§

impl Eq for DateFormat

source§

impl StructuralEq for DateFormat

source§

impl StructuralPartialEq for DateFormat

Auto Trait Implementations§

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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

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

§

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>,

§

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>,

§

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.