![]() |
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 | 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 192 of file qttemporalpattern_p.h.
|
inlinenoexcept |
get-base-year
Definition at line 223 of file qttemporalpattern_p.h.
|
inlinenoexcept |
Returns the current calendar in use by this pattern.
Definition at line 226 of file qttemporalpattern_p.h.
|
inlinenoexcept |
clear-base-year
Definition at line 222 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 234 of file qttemporalpattern_p.h.
|
static |
Construct a QDateTimePattern described by the given format string.
Definition at line 937 of file qttemporalpattern.cpp.
|
inlinenoexcept |
{is-valid} {datetime}
base-year-disambiguates
Timezone abbreviations are ambiguous.
Definition at line 214 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 219 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 890 of file qttemporalpattern.cpp.
Serialize the given datetime to a string representation.
Definition at line 925 of file qttemporalpattern.cpp.
|
inline |
set-base-year
Definition at line 221 of file qttemporalpattern_p.h.
set-calendar
Definition at line 225 of file qttemporalpattern_p.h.
Definition at line 218 of file qttemporalpattern_p.h.