KDECore
Go to the documentation of this file.
32 #include <QtCore/QMetaType>
33 #include <QtCore/QSharedDataPointer>
36 class KDateTimePrivate;
37 class KDateTimeSpecPrivate;
268 bool isValid()
const;
300 bool isLocalZone()
const;
308 bool isClockTime()
const;
327 bool isOffsetFromUtc()
const;
336 int utcOffset()
const;
347 void setType(
SpecType type,
int utcOffset = 0);
383 bool equivalentTo(
const Spec &other)
const;
395 static Spec ClockTime();
404 static Spec OffsetFromUTC(
int utcOffset);
412 static Spec LocalZone();
415 KDateTimeSpecPrivate*
const d;
498 Equal = AtStart | Inside | AtEnd,
501 Outside = Before | AtStart | Inside | AtEnd | After,
506 StartsAt = AtStart | Inside | AtEnd | After,
511 EndsAt = Before | AtStart | Inside | AtEnd
541 explicit KDateTime(
const QDate &date,
const Spec &spec = Spec(LocalZone));
560 KDateTime(
const QDate &date,
const QTime &time,
const Spec &spec = Spec(LocalZone));
621 bool isValid()
const;
628 bool isDateOnly()
const;
679 Spec timeSpec()
const;
690 SpecType timeType()
const;
699 bool isLocalZone()
const;
707 bool isClockTime()
const;
727 bool isOffsetFromUtc()
const;
736 int utcOffset()
const;
756 bool isSecondOccurrence()
const;
800 KDateTime toOffsetFromUtc(
int utcOffset)
const;
848 KDateTime toTimeSpec(
const Spec &spec)
const;
870 uint toTime_t()
const;
879 void setTime_t(
qint64 seconds);
890 void setDateOnly(
bool dateOnly);
898 void setDate(
const QDate &date);
907 void setTime(
const QTime &time);
936 void setTimeSpec(
const Spec &spec);
961 void setSecondOccurrence(
bool second);
1070 int secsTo(
const KDateTime &other)
const;
1122 int daysTo(
const KDateTime &other)
const;
1131 static KDateTime currentLocalDateTime();
1154 static KDateTime currentDateTime(
const Spec &spec);
1164 static QDate currentLocalDate();
1174 static QTime currentLocalTime();
1266 QString toString(TimeFormat format = ISODate)
const;
1308 static KDateTime fromString(
const QString &
string, TimeFormat format = ISODate,
bool *negZero = 0);
1448 const KTimeZones *zones = 0,
bool offsetIfAmbiguous =
true);
1462 static void setFromStringDefault(
const Spec &spec);
1476 bool outOfRange()
const;
1506 Comparison compare(
const KDateTime &other)
const;
1600 static void setSimulatedSystemTime(
const KDateTime& newTime);
1619 static KDateTime realCurrentLocalDateTime();
1621 friend QDataStream KDECORE_EXPORT &
operator<<(QDataStream &out,
const KDateTime &dateTime);
1625 QSharedDataPointer<KDateTimePrivate> d;
1632 QDataStream KDECORE_EXPORT &operator<<(QDataStream &out, const
KDateTime::Spec &spec);
1634 QDataStream KDECORE_EXPORT &operator>>(QDataStream &in,
KDateTime::Spec &spec);
1637 QDataStream KDECORE_EXPORT &operator<<(QDataStream &out, const
KDateTime &dateTime);
1639 QDataStream KDECORE_EXPORT &operator>>(QDataStream &in,
KDateTime &dateTime);
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 17:47:33 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.