- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Comparable<QDateTime>
Date and time functions
Java wrapper for Qt's class QDateTime
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionQDateTime
(QDate date, QTime time, Qt.TimeSpec spec) Deprecated.Pass QTimeZone insteadQDateTime
(QDate date, QTime time, Qt.TimeSpec spec, int offsetSeconds) Deprecated.Pass QTimeZone insteadprotected
Constructor for internal use only. -
Method Summary
Modifier and TypeMethodDescriptionfinal QDateTime
addDays
(long days) final QDateTime
addMonths
(int months) final QDateTime
addMSecs
(long msecs) final QDateTime
addSecs
(long secs) final QDateTime
addYears
(int years) final void
clone()
Creates and returns a copy of this object.int
static QDateTime
static QDateTime
currentDateTime
(QTimeZone zone) static QDateTime
static long
static long
final QDate
date()
final long
boolean
Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical.static QDateTime
fromMSecsSinceEpoch
(long msecs) static QDateTime
fromMSecsSinceEpoch
(long msecs, Qt.TimeSpec spec) Deprecated.Pass QTimeZone instead of time-spec, offsetstatic QDateTime
fromMSecsSinceEpoch
(long msecs, Qt.TimeSpec spec, int offsetFromUtc) Deprecated.Pass QTimeZone instead of time-spec, offsetstatic QDateTime
fromMSecsSinceEpoch
(long msecs, QTimeZone timeZone) static QDateTime
fromSecsSinceEpoch
(long secs) static QDateTime
fromSecsSinceEpoch
(long secs, Qt.TimeSpec spec) Deprecated.Pass QTimeZone instead of time-spec, offsetstatic QDateTime
fromSecsSinceEpoch
(long secs, Qt.TimeSpec spec, int offsetFromUtc) Deprecated.Pass QTimeZone instead of time-spec, offsetstatic QDateTime
fromSecsSinceEpoch
(long secs, QTimeZone timeZone) static QDateTime
fromString
(String string) Overloaded function forfromString(java.lang.String, io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
.static QDateTime
fromString
(String string, Qt.DateFormat format) static QDateTime
fromString
(String string, String format) Overloaded function forfromString(java.lang.String, java.lang.String, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
.static QDateTime
fromString
(String string, String format, QCalendar cal) int
hashCode()
final boolean
final boolean
isNull()
final boolean
isValid()
final long
final int
void
readFrom
(QDataStream arg__1) final long
final void
final void
setMSecsSinceEpoch
(long msecs) final void
setOffsetFromUtc
(int offsetSeconds) Deprecated.UsesetTimeZone(io.qt.core.QTimeZone)
insteadfinal void
setSecsSinceEpoch
(long secs) final void
final void
setTimeSpec
(Qt.TimeSpec spec) Deprecated.UsesetTimeZone(io.qt.core.QTimeZone)
insteadfinal void
setTimeZone
(QTimeZone toZone) final void
final QTime
time()
final QTimeZone
final Qt.TimeSpec
timeSpec()
final QTimeZone
timeZone()
final String
final QDateTime
final long
final QDateTime
toOffsetFromUtc
(int offsetSeconds) final long
final String
toString()
Overloaded function fortoString(io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
.final String
toString
(Qt.DateFormat format) final String
Overloaded function fortoString(java.lang.String, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
.final String
final QDateTime
toTimeSpec
(Qt.TimeSpec spec) Deprecated.UsetoTimeZone(io.qt.core.QTimeZone)
insteadfinal QDateTime
toTimeZone
(QTimeZone toZone) final QDateTime
toUTC()
void
writeTo
(QDataStream arg__1) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QDateTime
public QDateTime() -
QDateTime
-
QDateTime
Deprecated.Pass QTimeZone insteadOverloaded constructor for
QDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.Qt.TimeSpec, int)
withoffsetSeconds = 0
. -
QDateTime
Deprecated.Pass QTimeZone instead -
QDateTime
-
QDateTime
-
QDateTime
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
addDays
-
addMSecs
-
addMonths
-
addSecs
-
addYears
-
date
-
daysTo
-
isDaylightTime
-
isNull
-
isValid
-
msecsTo
-
offsetFromUtc
-
writeTo
-
assign
-
readFrom
-
secsTo
-
setDate
-
setMSecsSinceEpoch
-
setOffsetFromUtc
Deprecated.UsesetTimeZone(io.qt.core.QTimeZone)
instead -
setSecsSinceEpoch
-
setTime
-
setTimeSpec
Deprecated.UsesetTimeZone(io.qt.core.QTimeZone)
instead -
setTimeZone
-
swap
-
time
-
timeRepresentation
-
timeSpec
-
timeZone
-
timeZoneAbbreviation
-
toLocalTime
-
toMSecsSinceEpoch
-
toOffsetFromUtc
-
toSecsSinceEpoch
-
toString
Overloaded function for
toString(io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
. -
toString
-
toString
Overloaded function for
toString(java.lang.String, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
. -
toString
-
toTimeSpec
Deprecated.UsetoTimeZone(io.qt.core.QTimeZone)
instead -
toTimeZone
-
toUTC
-
currentDateTime
-
currentDateTime
-
currentDateTimeUtc
-
currentMSecsSinceEpoch
public static long currentMSecsSinceEpoch() -
currentSecsSinceEpoch
public static long currentSecsSinceEpoch() -
fromMSecsSinceEpoch
-
fromMSecsSinceEpoch
Deprecated.Pass QTimeZone instead of time-spec, offsetOverloaded function for
fromMSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromMSecsSinceEpoch
@Deprecated public static QDateTime fromMSecsSinceEpoch(long msecs, Qt.TimeSpec spec, int offsetFromUtc) Deprecated.Pass QTimeZone instead of time-spec, offset -
fromMSecsSinceEpoch
-
fromSecsSinceEpoch
-
fromSecsSinceEpoch
Deprecated.Pass QTimeZone instead of time-spec, offsetOverloaded function for
fromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromSecsSinceEpoch
@Deprecated public static QDateTime fromSecsSinceEpoch(long secs, Qt.TimeSpec spec, int offsetFromUtc) Deprecated.Pass QTimeZone instead of time-spec, offset -
fromSecsSinceEpoch
-
fromString
Overloaded function for
fromString(java.lang.String, io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
. -
fromString
-
fromString
Overloaded function for
fromString(java.lang.String, java.lang.String, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
. -
fromString
-
equals
Description copied from class:QtObject
Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical. Qt value types override this method to make a value comparison. Otherwise it will return the result of calling the super class implementation. -
compareTo
- Specified by:
compareTo
in interfaceComparable<QDateTime>
-
hashCode
-
clone
Creates and returns a copy of this object.
-