- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Comparable<QDateTime>
Date and time functions
Java wrapper for Qt class QDateTime
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionQDateTime
(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, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
.static QDateTime
fromString
(String string, String format, 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) final long
final void
final void
setMSecsSinceEpoch
(long msecs) final void
setOffsetFromUtc
(int offsetSeconds) SeeQDateTime::
setOffsetFromUtc(int) final void
setSecsSinceEpoch
(long secs) final void
final void
setTimeSpec
(Qt.TimeSpec spec) SeeQDateTime::
setTimeSpec(Qt::TimeSpec) final 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) SeeQDateTime::
toTimeSpec(Qt::TimeSpec)const final 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
See
QDateTime::
QDateTime(QDate, QTime) This function was introduced in Qt 6.5.
-
QDateTime
-
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.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
-
assign
-
readFrom
-
secsTo
-
setDate
-
setMSecsSinceEpoch
-
setOffsetFromUtc
See
QDateTime::
setOffsetFromUtc(int) -
setSecsSinceEpoch
-
setTime
-
setTimeSpec
See
QDateTime::
setTimeSpec(Qt::TimeSpec) -
setTimeZone
-
swap
-
time
-
timeRepresentation
See
QDateTime::
timeRepresentation()const This function was introduced in Qt 6.5.
-
timeSpec
-
timeZone
-
timeZoneAbbreviation
-
toLocalTime
-
toMSecsSinceEpoch
-
toOffsetFromUtc
-
toSecsSinceEpoch
-
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, 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.
-
toString
Overloaded function for
toString(java.lang.String, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
. -
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, io.qt.core.QCalendar)
withcal = new io.qt.core.QCalendar()
. -
fromString
Overloaded function for
fromString(java.lang.String, io.qt.core.Qt.DateFormat)
withformat = io.qt.core.Qt.DateFormat.TextDate
.
-