![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
A description of a serialization format for a datetime. More...
#include <qttemporalpattern_p.h>
Public Member Functions | |
| bool | isNull () const noexcept |
Returns true if this pattern has no fields, otherwise false. | |
| bool | isValid () const noexcept |
| void | setLocale (const QLocale &loc) |
| const QLocale & | locale () const noexcept |
| Returns the current locale in use by this pattern. | |
| void | setBaseYear (int centuryStart) |
| void | clearBaseYear () noexcept |
| std::optional< int > | baseYear () const noexcept |
| void | setCalendar (QCalendar cal) |
| QCalendar | calendar () const noexcept |
| Returns the current calendar in use by this pattern. | |
| Q_CORE_EXPORT QtTemporalPattern::ParseResult< QDateTime > | parse (QStringView text, const QDateTime &defaults={}) const |
| Q_CORE_EXPORT QString | serialize (const QDateTime &datetime) const |
| Serialize the given datetime to a string representation. | |
Static Public Member Functions | |
| static Q_CORE_EXPORT QDateTimePattern | fromQtFormat (QStringView format) |
| Construct a QDateTimePattern described by the given format string. | |
| static QDateTimePattern | forLocale (const QLocale &locale, QLocale::FormatType format=QLocale::LongFormat) |
| Construct a QDateTimePattern appropriate to the given locale. | |
A description of a serialization format for a datetime.
Definition at line 201 of file qttemporalpattern_p.h.
|
inlinenoexcept |
get-base-year
Definition at line 233 of file qttemporalpattern_p.h.
|
inlinenoexcept |
Returns the current calendar in use by this pattern.
Definition at line 236 of file qttemporalpattern_p.h.
|
inlinenoexcept |
clear-base-year
Definition at line 232 of file qttemporalpattern_p.h.
|
inlinestatic |
Construct a QDateTimePattern appropriate to the given locale.
The format can be used to select how compact or expansive the pattern is.
Definition at line 244 of file qttemporalpattern_p.h.
|
static |
Construct a QDateTimePattern described by the given format string.
If the format is empty or malformed, the returned pattern's isNull() shall be true. Otherwise, isNull() shall be false.
Definition at line 994 of file qttemporalpattern.cpp.
|
inlinenoexcept |
Returns true if this pattern has no fields, otherwise false.
Definition at line 223 of file qttemporalpattern_p.h.
|
inlinenoexcept |
{is-valid} {datetime}
base-year-disambiguates
Timezone abbreviations are ambiguous.
Definition at line 224 of file qttemporalpattern_p.h.
References QtTemporalPattern::Clear.
|
inlinenoexcept |
Returns the current locale in use by this pattern.
\fn QDateTimePattern::setLocale(const QLocale &loc) noexcept
! [set-locale] Sets the locale, for use for fields whose representation depends on locale, to loc. By default the application's current default locale is used.
Definition at line 229 of file qttemporalpattern_p.h.
| QtTemporalPattern::ParseResult< QDateTime > QDateTimePattern::parse | ( | QStringView | text, |
| const QDateTime & | defaults = {} ) const |
Parse and return the datetime represented by \a text.
! [parser-defaults] If defaults is provided and valid, any fields the format described by this pattern does not provide will be copied from defaults to construct the returned value. ! [parser-defaults]
Definition at line 954 of file qttemporalpattern.cpp.
Serialize the given datetime to a string representation.
Definition at line 979 of file qttemporalpattern.cpp.
|
inline |
set-base-year
Definition at line 231 of file qttemporalpattern_p.h.
set-calendar
Definition at line 235 of file qttemporalpattern_p.h.
Definition at line 228 of file qttemporalpattern_p.h.