- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Comparable<QDateTime>
Date and time functions
Java wrapper for Qt's class QDateTime
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Constructor Summary
ModifierConstructorDescriptionDeprecated.Overloaded constructor forQDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.Qt.TimeSpec)
withspec = io.qt.core.Qt.TimeSpec.LocalTime
.QDateTime
(QDate arg__1, QTime arg__2, Qt.TimeSpec spec) QDateTime
(QDate date, QTime time, Qt.TimeSpec spec, int offsetSeconds) protected
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) clone()
int
static QDateTime
static QDateTime
static long
static long
final QDate
date()
final long
boolean
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface.static QDateTime
fromMSecsSinceEpoch
(long msecs) static QDateTime
fromMSecsSinceEpoch
(long msecs, Qt.TimeSpec spec) Overloaded function forfromMSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
.static QDateTime
fromMSecsSinceEpoch
(long msecs, Qt.TimeSpec spec, int offsetFromUtc) static QDateTime
fromMSecsSinceEpoch
(long msecs, QTimeZone timeZone) static QDateTime
fromSecsSinceEpoch
(long secs) Overloaded function forfromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
static QDateTime
fromSecsSinceEpoch
(long secs, Qt.TimeSpec spe) Overloaded function forfromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
.static QDateTime
fromSecsSinceEpoch
(long secs, Qt.TimeSpec spe, int offsetFromUtc) static QDateTime
fromSecsSinceEpoch
(long secs, QTimeZone timeZone) static QDateTime
fromString
(String s) Overloaded function forfromString(java.lang.String, io.qt.core.Qt.DateFormat)
withf = io.qt.core.Qt.DateFormat.TextDate
.static QDateTime
fromString
(String s, Qt.DateFormat f) static QDateTime
fromString
(String s, String format) static QDateTime
fromString
(String s, String format, QCalendar cal) static QDateTime
fromTime_t
(int secsSince1Jan1970UTC) static QDateTime
fromTime_t
(int secsSince1Jan1970UTC, Qt.TimeSpec spec) Overloaded function forfromTime_t(int, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
.static QDateTime
fromTime_t
(int secsSince1Jan1970UTC, Qt.TimeSpec spec, int offsetFromUtc) static QDateTime
fromTime_t
(int secsSince1Jan1970UTC, QTimeZone timeZone) 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) final void
setSecsSinceEpoch
(long secs) final void
final void
setTime_t
(int secsSince1Jan1970UTC) final void
setTimeSpec
(Qt.TimeSpec spec) final void
setTimeZone
(QTimeZone toZone) final void
setUtcOffset
(int seconds) Deprecated.UsesetOffsetFromUtc(int)
insteadfinal void
final QTime
time()
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
final String
final int
toTime_t()
final QDateTime
toTimeSpec
(Qt.TimeSpec spec) final QDateTime
toTimeZone
(QTimeZone toZone) final QDateTime
toUTC()
final int
Deprecated.UseoffsetFromUtc()
insteadvoid
writeTo
(QDataStream arg__1) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QDateTime
public QDateTime() -
QDateTime
Deprecated.UseQDate.startOfDay(io.qt.core.Qt.TimeSpec, int)
instead -
QDateTime
Overloaded constructor for
QDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.Qt.TimeSpec)
withspec = io.qt.core.Qt.TimeSpec.LocalTime
. -
QDateTime
-
QDateTime
-
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
-
readFrom
-
secsTo
-
setDate
-
setMSecsSinceEpoch
-
setOffsetFromUtc
-
setSecsSinceEpoch
-
setTime
-
setTimeSpec
-
setTimeZone
-
setTime_t
-
setUtcOffset
Deprecated.UsesetOffsetFromUtc(int)
instead -
swap
-
time
-
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
-
toString
-
toTimeSpec
-
toTimeZone
-
toTime_t
-
toUTC
-
utcOffset
Deprecated.UseoffsetFromUtc()
instead -
currentDateTime
-
currentDateTimeUtc
-
currentMSecsSinceEpoch
public static long currentMSecsSinceEpoch() -
currentSecsSinceEpoch
public static long currentSecsSinceEpoch() -
fromMSecsSinceEpoch
-
fromMSecsSinceEpoch
Overloaded function for
fromMSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromMSecsSinceEpoch
-
fromMSecsSinceEpoch
-
fromSecsSinceEpoch
Overloaded function for
fromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromSecsSinceEpoch
Overloaded function for
fromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
with:
spe = io.qt.core.Qt.TimeSpec.LocalTime
offsetFromUtc = 0
-
fromSecsSinceEpoch
-
fromSecsSinceEpoch
-
fromString
Overloaded function for
fromString(java.lang.String, io.qt.core.Qt.DateFormat)
withf = io.qt.core.Qt.DateFormat.TextDate
. -
fromString
-
fromString
-
fromString
-
fromTime_t
-
fromTime_t
Overloaded function for
fromTime_t(int, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromTime_t
-
fromTime_t
-
equals
Description copied from class:QtObject
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface. Otherwise it will return the result of calling the super class implementation. -
compareTo
- Specified by:
compareTo
in interfaceComparable<QDateTime>
-
hashCode
-
clone
-
QDate.startOfDay(io.qt.core.Qt.TimeSpec, int)
instead