Messagelib
dateformatter.cpp
Go to the documentation of this file.
47 static QString localized(const QDateTime &t, bool shortFormat = true, const QString &lang = QString());
98QString DateFormatter::dateString(const QDateTime &dt, const QString &lang, bool shortFormat) const
194QString DateFormatterPrivate::localized(const QDateTime &t, bool shortFormat, const QString &lang)
212QString DateFormatter::formatDate(FormatType ftype, const QDateTime &t, const QString &data, bool shortFormat)
221QString DateFormatter::formatCurrentDate(FormatType ftype, const QString &data, bool shortFormat)
void invalidateReferenceDate() const
Invalidates the cached reference date used by the Fancy formatter to determine the meaning of "Today"...
Definition dateformatter.cpp:143
static QString formatCurrentDate(DateFormatter::FormatType ftype, const QString &data=QString(), bool shortFormat=true)
Convenience function, same as formatDate() but returns the current time formatted.
Definition dateformatter.cpp:221
void setCustomFormat(const QString &format)
Sets the custom format for date to string conversions to format.
Definition dateformatter.cpp:132
static QString formatDate(DateFormatter::FormatType ftype, const QDateTime &t, const QString &data=QString(), bool shortFormat=true)
Convenience function dateString.
Definition dateformatter.cpp:212
QString dateString(const QDateTime &dtime, const QString &lang=QString(), bool shortFormat=true) const
Constructs a formatted date string from QDateTime dtime.
Definition dateformatter.cpp:98
DateFormatter(FormatType ftype=DateFormatter::Fancy)
Constructs a date formatter with a default FormatType.
Definition dateformatter.cpp:80
This file is part of the API for handling MIME data and defines the DateFormatter class.
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString i18n(const char *text, const TYPE &arg...)
char * toString(const EngineQuery &query)
QDate currentDate()
int dayOfWeek() const const
QDateTime currentDateTime()
QDate date() const const
qint64 daysTo(const QDateTime &other) const const
bool isValid() const const
int offsetFromUtc() const const
QTime time() const const
QString toString(QStringView format, QCalendar cal) const const
ShortFormat
QString toString(QDate date, FormatType format) const const
void chop(qsizetype n)
QChar * data()
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
qsizetype size() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.