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
191QString DateFormatterPrivate::localized(const QDateTime &t, bool shortFormat, const QString &lang)
209QString DateFormatter::formatDate(FormatType ftype, const QDateTime &t, const QString &data, bool shortFormat)
218QString DateFormatter::formatCurrentDate(FormatType ftype, const QString &data, bool shortFormat)
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:218
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:209
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
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()
QDateTime currentDateTime()
bool isValid() const const
int offsetFromUtc() const const
qint64 secsTo(const QDateTime &other) 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 Fri Oct 11 2024 12:08:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:08:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.