- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Comparable<QDateTime>
Date and time functions
Java wrapper for Qt class QDateTime
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Java wrapper for Qt enumQDateTime::TransitionResolution
static enum
Java wrapper for Qt enumQDateTime::YearRange
-
Constructor Summary
ConstructorDescriptionOverloaded constructor forQDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
.Overloaded constructor forQDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.QTimeZone, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
.QDateTime
(QDate date, QTime time, QTimeZone timeZone, QDateTime.TransitionResolution resolve) QDateTime
(QDate date, QTime time, QDateTime.TransitionResolution resolve) QDateTime
(QDate date, QTime time, Qt.TimeSpec spec) Overloaded constructor forQDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.Qt.TimeSpec, int)
withoffsetSeconds = 0
.QDateTime
(QDate date, QTime time, Qt.TimeSpec spec, int offsetSeconds) SeeQDateTime::
QDateTime(QDate, QTime, Qt::TimeSpec, int) -
Method Summary
Modifier and TypeMethodDescriptionfinal QDateTime
addDays
(long days) final QDateTime
addDuration
(TemporalAmount msecs) 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
static QDateTime
fromMSecsSinceEpoch
(long msecs) static QDateTime
fromMSecsSinceEpoch
(long msecs, QTimeZone timeZone) 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) SeeQDateTime::
fromMSecsSinceEpoch(qint64, Qt::TimeSpec, int) static QDateTime
fromSecsSinceEpoch
(long secs) static QDateTime
fromSecsSinceEpoch
(long secs, QTimeZone timeZone) static QDateTime
fromSecsSinceEpoch
(long secs, Qt.TimeSpec spec) Overloaded function forfromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
.static QDateTime
fromSecsSinceEpoch
(long secs, Qt.TimeSpec spec, int offsetFromUtc) SeeQDateTime::
fromSecsSinceEpoch(qint64, Qt::TimeSpec, int) 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, int)
withbaseYear = io.qt.core.QLocale.DefaultTwoDigitBaseYear
.static QDateTime
fromString
(String string, String format, int baseYear) static QDateTime
fromString
(String string, String format, int baseYear, QCalendar cal) int
hashCode()
Returns the objects's hash code computed byqHash(QDateTime)
.final boolean
final boolean
isNull()
final boolean
isValid()
final Duration
Seeoperator-(QDateTime,
QDateTime) final QDateTime
minus
(TemporalAmount duration) Seeoperator-(QDateTime,
std::chrono::milliseconds) final long
final int
final QDateTime
plus
(TemporalAmount duration) Seeoperator+(QDateTime,
std::chrono::milliseconds) void
readFrom
(QDataStream arg__1) Seeoperator>>(QDataStream&,
QDateTime&) final long
final void
Overloaded function forsetDate(io.qt.core.QDate, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
.final void
setDate
(QDate date, QDateTime.TransitionResolution resolve) final void
setMSecsSinceEpoch
(long msecs) final void
setOffsetFromUtc
(int offsetSeconds) SeeQDateTime::
setOffsetFromUtc(int) final void
setSecsSinceEpoch
(long secs) final void
Overloaded function forsetTime(io.qt.core.QTime, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
.final void
setTime
(QTime time, QDateTime.TransitionResolution resolve) final void
setTimeSpec
(Qt.TimeSpec spec) SeeQDateTime::
setTimeSpec(Qt::TimeSpec) final void
setTimeZone
(QTimeZone toZone) Overloaded function forsetTimeZone(io.qt.core.QTimeZone, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
.final void
setTimeZone
(QTimeZone toZone, QDateTime.TransitionResolution resolve) 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
final String
final QDateTime
toTimeSpec
(Qt.TimeSpec spec) SeeQDateTime::
toTimeSpec(Qt::TimeSpec)const final QDateTime
toTimeZone
(QTimeZone toZone) final QDateTime
toUTC()
void
writeTo
(QDataStream arg__1) Seeoperator<<(QDataStream&,
QDateTime) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QDateTime
public QDateTime() -
QDateTime
See
QDateTime::
QDateTime(QDate, QTime, QDateTime::TransitionResolution) This function was introduced in Qt 6.5.
-
QDateTime
public QDateTime(QDate date, QTime time, QTimeZone timeZone, QDateTime.TransitionResolution resolve) -
QDateTime
See
QDateTime::
QDateTime(QDate, QTime, Qt::TimeSpec, int) -
QDateTime
-
QDateTime
Overloaded constructor for
QDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
. -
QDateTime
Overloaded constructor for
QDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.QTimeZone, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
. -
QDateTime
Overloaded constructor for
QDateTime(io.qt.core.QDate, io.qt.core.QTime, io.qt.core.Qt.TimeSpec, int)
withoffsetSeconds = 0
.
-
-
Method Details
-
addDays
-
addDuration
See
QDateTime::
addDuration(std::chrono::milliseconds)const This function was introduced in Qt 6.4.
-
addMSecs
-
addMonths
-
addSecs
-
addYears
-
date
-
daysTo
-
isDaylightTime
-
isNull
-
isValid
-
msecsTo
-
offsetFromUtc
-
plus
See
operator+(QDateTime,
std::chrono::milliseconds) -
minus
See
operator-(QDateTime,
QDateTime) -
minus
See
operator-(QDateTime,
std::chrono::milliseconds) -
writeTo
See
operator<<(QDataStream&,
QDateTime) -
assign
-
readFrom
See
operator>>(QDataStream&,
QDateTime&) -
secsTo
-
setDate
-
setMSecsSinceEpoch
-
setOffsetFromUtc
See
QDateTime::
setOffsetFromUtc(int) -
setSecsSinceEpoch
-
setTime
-
setTimeSpec
See
QDateTime::
setTimeSpec(Qt::TimeSpec) -
setTimeZone
@QtUninvokable public final void setTimeZone(QTimeZone toZone, QDateTime.TransitionResolution resolve) -
swap
-
time
-
timeRepresentation
See
QDateTime::
timeRepresentation()const This function was introduced in Qt 6.5.
-
timeSpec
-
timeZone
-
timeZoneAbbreviation
-
toLocalTime
-
toMSecsSinceEpoch
-
toOffsetFromUtc
-
toSecsSinceEpoch
-
toString
-
toString
-
toString
-
toTimeSpec
See
QDateTime::
toTimeSpec(Qt::TimeSpec)const -
toTimeZone
-
toUTC
-
currentDateTime
-
currentDateTime
See
QDateTime::
currentDateTime(QTimeZone) This function was introduced in Qt 6.5.
-
currentDateTimeUtc
-
currentMSecsSinceEpoch
public static long currentMSecsSinceEpoch() -
currentSecsSinceEpoch
public static long currentSecsSinceEpoch() -
fromMSecsSinceEpoch
See
QDateTime::
fromMSecsSinceEpoch(qint64) This function was introduced in Qt 6.5.
-
fromMSecsSinceEpoch
-
fromMSecsSinceEpoch
See
QDateTime::
fromMSecsSinceEpoch(qint64, Qt::TimeSpec, int) -
fromSecsSinceEpoch
See
QDateTime::
fromSecsSinceEpoch(qint64) This function was introduced in Qt 6.5.
-
fromSecsSinceEpoch
-
fromSecsSinceEpoch
See
QDateTime::
fromSecsSinceEpoch(qint64, Qt::TimeSpec, int) -
fromString
See
QDateTime::
fromString(QString, QStringView, int) This function was introduced in Qt 6.7.
-
fromString
See
QDateTime::
fromString(QString, QStringView, int, QCalendar) This function was introduced in Qt 6.0.
-
fromString
See
QDateTime::
fromString(QStringView, Qt::DateFormat) This function was introduced in Qt 6.0.
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<QDateTime>
-
hashCode
Returns the objects's hash code computed byqHash(QDateTime)
. -
clone
Creates and returns a copy of this object.
-
setDate
Overloaded function for
setDate(io.qt.core.QDate, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
. -
setTime
Overloaded function for
setTime(io.qt.core.QTime, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
. -
setTimeZone
Overloaded function for
setTimeZone(io.qt.core.QTimeZone, io.qt.core.QDateTime.TransitionResolution)
withresolve = io.qt.core.QDateTime.TransitionResolution.LegacyBehavior
. -
toString
Overloaded function for
toString(io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
. -
fromMSecsSinceEpoch
Overloaded function for
fromMSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromSecsSinceEpoch
Overloaded function for
fromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
. -
fromString
Overloaded function for
fromString(java.lang.String, java.lang.String, int)
withbaseYear = io.qt.core.QLocale.DefaultTwoDigitBaseYear
. -
fromString
Overloaded function for
fromString(java.lang.String, io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
.
-