KMIME Library
kmime_dateformatter.cpp
Go to the documentation of this file.
272 ret = locale->formatDateTime( tmp, ( shortFormat ? KLocale::ShortDate : KLocale::LongDate ), includeSecs );
275 ret = locale->formatDateTime( tmp, ( shortFormat ? KLocale::ShortDate : KLocale::LongDate ), includeSecs );
QString localized(time_t t, bool shortFormat=true, bool includeSecs=false, const QString &lang=QString()) const
Returns a QString containing the specified time_t t formatted using the Localized FormatType...
Definition: kmime_dateformatter.cpp:261
FormatType format() const
Returns the FormatType currently set.
Definition: kmime_dateformatter.cpp:60
QString fancy(time_t t) const
Returns a QString containing the specified time_t t formatted using the Fancy FormatType.
Definition: kmime_dateformatter.cpp:220
QString toString(Qt::DateFormat format) const
static QString formatCurrentDate(DateFormatter::FormatType ftype, const QString &data=QString(), bool shortFormat=true, bool includeSecs=false)
Convenience function, same as formatDate() but returns the current time formatted.
Definition: kmime_dateformatter.cpp:309
This file is part of the API for handling MIME data and defines the DateFormatter class...
QString customFormat() const
Returns the custom format string.
Definition: kmime_dateformatter.cpp:141
QTime time() const
void reset()
Resets the cached current date used for calculating the fancy date.
Definition: kmime_dateformatter.cpp:293
QString rfc2822(time_t t) const
Returns a QString containing the specified time_t t in the Rfc FormatType.
Definition: kmime_dateformatter.cpp:102
QByteArray zone(time_t t) const
Returns a QString that identifies the timezone (eg.
Definition: kmime_dateformatter.cpp:146
QString custom(time_t t) const
Returns a QString containing the specified time_t t formatted with a previously specified custom form...
Definition: kmime_dateformatter.cpp:115
bool isEmpty() const
QString trimmed() const
QString cTime(time_t t) const
Returns a QString containing the specified time_t t formatted with the ctime() function.
Definition: kmime_dateformatter.cpp:281
QDateTime fromString(const QString &string, Qt::DateFormat format)
QString dateString(time_t t, const QString &lang=QString(), bool shortFormat=true, bool includeSecs=false) const
Constructs a formatted date string from time_t t.
Definition: kmime_dateformatter.cpp:70
uint toTime_t() const
QString & replace(int position, int n, QChar after)
QDate date() const
int secsTo(const QDateTime &other) const
QDate currentDate()
static bool isDaylight()
Returns true if the current time is on daylight savings time; else false.
Definition: kmime_dateformatter.cpp:319
QString fromLatin1(const char *str, int size)
DateFormatter(FormatType ftype=DateFormatter::Fancy)
Constructs a date formatter with a default FormatType.
Definition: kmime_dateformatter.cpp:51
static QString formatDate(DateFormatter::FormatType ftype, time_t t, const QString &data=QString(), bool shortFormat=true, bool includeSecs=false)
Convenience function dateString.
Definition: kmime_dateformatter.cpp:298
void setFormat(FormatType ftype)
Sets the date format to ftype.
Definition: kmime_dateformatter.cpp:65
QString isoDate(time_t t) const
Returns a QString containing the specified time_t t in the "%Y-%m-%d %H:%M:%S" Iso FormatType...
Definition: kmime_dateformatter.cpp:286
time_t qdateToTimeT(const QDateTime &dt) const
Converts QDateTime dt to a time_t value.
Definition: kmime_dateformatter.cpp:207
void setCustomFormat(const QString &format)
Sets the custom format for date to string conversions to format.
Definition: kmime_dateformatter.cpp:135
void setTime_t(uint seconds)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.