KAlarm Library
datetime.cpp
As KDateTime, but with a configurable start-of-day time for date-only values.
Definition datetime.h:43
DateTime addMins(qint64 n) const
Returns a DateTime value mins minutes later than the value of this object.
Definition datetime.cpp:290
bool isOffsetFromUtc() const
Returns whether the date/time is a local time at a fixed offset from UTC.
Definition datetime.cpp:220
int utcOffset() const
Returns the UTC offset associated with the date/time.
Definition datetime.cpp:225
KDateTime kDateTime() const
Returns the date and time of the value as a KDateTime.
Definition datetime.cpp:132
QString toString(Qt::DateFormat f=Qt::TextDate) const
Returns the value as a string.
Definition datetime.cpp:330
DateTime toOffsetFromUtc() const
Returns the time expressed as an offset from UTC, using the UTC offset associated with this instance'...
Definition datetime.cpp:245
qint64 secsTo_long(const DateTime &dt) const
Returns the number of seconds as a qint64 from this date or date-time to dt.
Definition datetime.cpp:325
bool isValid() const
Returns true if the date is valid and, if it is a date-time value, the time is also valid.
Definition datetime.cpp:102
void setDateOnly(bool d)
Sets the value to be either date-only or date-time.
Definition datetime.cpp:112
bool isSecondOccurrence() const
Returns whether the date/time is the second occurrence of this time.
Definition datetime.cpp:230
bool isClockTime() const
Returns whether the date/time is a local clock time.
Definition datetime.cpp:210
void setDateTime(const QDateTime &dt)
Sets the date/time component of the value.
Definition datetime.cpp:158
KDateTime::SpecType timeType() const
Returns the time specification type of the date/time, i.e.
Definition datetime.cpp:200
void setTimeSpec(const KDateTime::Spec &spec)
Changes the time specification of the value.
Definition datetime.cpp:195
DateTime toTimeSpec(const KDateTime::Spec &spec) const
Returns the time converted to a new time specification.
Definition datetime.cpp:270
void setSecondOccurrence(bool second)
Sets whether this is the second occurrence of this date/time.
Definition datetime.cpp:235
QString formatLocale(bool shortFormat=true) const
Returns the value as a string, formatted according to the user's locale.
Definition datetime.cpp:346
KDateTime effectiveKDateTime() const
Returns the date and time of the value.
Definition datetime.cpp:163
DateTime addDays(int n) const
Returns a DateTime value n days later than the value of this object.
Definition datetime.cpp:295
QDateTime effectiveDateTime() const
Returns the date and time of the value.
Definition datetime.cpp:147
KDateTime calendarKDateTime() const
Returns the date and time of the value as written in the calendar.
Definition datetime.cpp:174
int secsTo(const DateTime &dt) const
Returns the number of seconds from this date or date-time to dt.
Definition datetime.cpp:320
DateTime toZone(const KTimeZone &zone) const
Returns the time converted to a specified time zone.
Definition datetime.cpp:265
DateTime addSecs(qint64 n) const
Returns a DateTime value secs seconds later than the value of this object.
Definition datetime.cpp:285
DateTime toClockTime() const
Returns the time converted to the local clock time.
Definition datetime.cpp:260
uint toTime_t() const
Converts the time to a UTC time, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned...
Definition datetime.cpp:275
DateTime toLocalZone() const
Returns the time converted to the current local system time zone.
Definition datetime.cpp:255
bool isLocalZone() const
Returns whether the time zone for the date/time is the current local system time zone.
Definition datetime.cpp:205
DateTime addYears(int n) const
Returns a DateTime value n years later than the value of this object.
Definition datetime.cpp:305
int daysTo(const DateTime &dt) const
Returns the number of days from this date or date-time to dt.
Definition datetime.cpp:310
KDateTime::Spec timeSpec() const
Returns the time specification of the value.
Definition datetime.cpp:190
bool isNull() const
Returns true if the date is null and, if it is a date-time value, the time is also null.
Definition datetime.cpp:97
DateTime addMonths(int n) const
Returns a DateTime value n months later than the value of this object.
Definition datetime.cpp:300
KDateTime::Comparison compare(const DateTime &other) const
Compare this value with another.
Definition datetime.cpp:356
int minsTo(const DateTime &dt) const
Returns the number of minutes from this date or date-time to dt.
Definition datetime.cpp:315
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.