- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Comparable<QDateTime>
Date and time functions
Java wrapper for Qt class QDateTime
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionOverloaded 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) -
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
static long
static long
final QDate
date()
final long
final boolean
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) static QDateTime
fromSecsSinceEpoch
(long secs) Overloaded function forfromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
static QDateTime
fromSecsSinceEpoch
(long secs, QTimeZone timeZone) 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
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) SeeQDateTime::
fromString(QString, QString) static QDateTime
fromString
(String s, String format, QCalendar cal) static QDateTime
fromTime_t
(int secsSince1Jan1970UTC) static QDateTime
fromTime_t
(int secsSince1Jan1970UTC, QTimeZone timeZone) 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) int
hashCode()
Returns the objects's hash code computed byqHash(QDateTime)
.final boolean
final boolean
isNull()
final boolean
isValid()
final long
final int
void
readFrom
(QDataStream arg__1) Seeoperator>>(QDataStream&,
QDateTime&) 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) SeeQDateTime::
setUtcOffset(int) final 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
SeeQDateTime::
utcOffset()const void
writeTo
(QDataStream arg__1) Seeoperator<<(QDataStream&,
QDateTime) Methods inherited from class io.qt.QtObject
dispose, isDisposed
-
Constructor Details
-
QDateTime
public QDateTime() -
QDateTime
- Parameters:
arg__1
-
-
QDateTime
- Parameters:
date
-time
-timeZone
-- Since:
- This function was introduced in Qt 5.2.
-
QDateTime
- Parameters:
arg__1
-arg__2
-spec
-
-
QDateTime
- Parameters:
date
-time
-spec
-offsetSeconds
-- Since:
- This function was introduced in Qt 5.2.
-
QDateTime
- Parameters:
other
-
-
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
.
-
-
Method Details
-
addDays
- Parameters:
days
-- Returns:
-
addMSecs
- Parameters:
msecs
-- Returns:
-
addMonths
- Parameters:
months
-- Returns:
-
addSecs
- Parameters:
secs
-- Returns:
-
addYears
- Parameters:
years
-- Returns:
-
date
- Returns:
-
daysTo
- Parameters:
arg__1
-- Returns:
-
isDaylightTime
- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
isNull
- Returns:
-
isValid
- Returns:
-
msecsTo
- Parameters:
arg__1
-- Returns:
-
offsetFromUtc
- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
writeTo
See
operator<<(QDataStream&,
QDateTime) - Parameters:
arg__1
-
-
assign
- Parameters:
other
-
-
equals
- Parameters:
other
-- Returns:
-
readFrom
See
operator>>(QDataStream&,
QDateTime&) - Parameters:
arg__1
-
-
secsTo
- Parameters:
arg__1
-- Returns:
-
setDate
- Parameters:
date
-
-
setMSecsSinceEpoch
- Parameters:
msecs
-- Since:
- This function was introduced in Qt 4.7.
-
setOffsetFromUtc
- Parameters:
offsetSeconds
-- Since:
- This function was introduced in Qt 5.2.
-
setSecsSinceEpoch
- Parameters:
secs
-- Since:
- This function was introduced in Qt 5.8.
-
setTime
- Parameters:
time
-
-
setTimeSpec
- Parameters:
spec
-
-
setTimeZone
- Parameters:
toZone
-- Since:
- This function was introduced in Qt 5.2.
-
setTime_t
- Parameters:
secsSince1Jan1970UTC
-
-
setUtcOffset
See
QDateTime::
setUtcOffset(int) - Parameters:
seconds
-
-
swap
- Parameters:
other
-- Since:
- This function was introduced in Qt 5.0.
-
time
- Returns:
-
timeSpec
- Returns:
-
timeZone
- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
timeZoneAbbreviation
- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
toLocalTime
- Returns:
-
toMSecsSinceEpoch
- Returns:
- Since:
- This function was introduced in Qt 4.7.
-
toOffsetFromUtc
- Parameters:
offsetSeconds
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
toSecsSinceEpoch
- Returns:
- Since:
- This function was introduced in Qt 5.8.
-
toString
- Parameters:
format
-- Returns:
-
toString
- Parameters:
format
-cal
-- Returns:
-
toString
- Parameters:
format
-- Returns:
-
toTimeSpec
- Parameters:
spec
-- Returns:
-
toTimeZone
- Parameters:
toZone
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
toTime_t
- Returns:
-
toUTC
- Returns:
-
utcOffset
See
QDateTime::
utcOffset()const - Returns:
-
currentDateTime
- Returns:
-
currentDateTimeUtc
- Returns:
- Since:
- This function was introduced in Qt 4.7.
-
currentMSecsSinceEpoch
public static long currentMSecsSinceEpoch()- Returns:
- Since:
- This function was introduced in Qt 4.7.
-
currentSecsSinceEpoch
public static long currentSecsSinceEpoch()- Returns:
- Since:
- This function was introduced in Qt 5.8.
-
fromMSecsSinceEpoch
- Parameters:
msecs
-- Returns:
- Since:
- This function was introduced in Qt 4.7.
-
fromMSecsSinceEpoch
- Parameters:
msecs
-timeZone
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
fromMSecsSinceEpoch
- Parameters:
msecs
-spec
-offsetFromUtc
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
fromSecsSinceEpoch
- Parameters:
secs
-timeZone
-- Returns:
- Since:
- This function was introduced in Qt 5.8.
-
fromSecsSinceEpoch
- Parameters:
secs
-spe
-offsetFromUtc
-- Returns:
- Since:
- This function was introduced in Qt 5.8.
-
fromString
See
QDateTime::
fromString(QString, QString) - Parameters:
s
-format
-- Returns:
-
fromString
- Parameters:
s
-format
-cal
-- Returns:
-
fromString
- Parameters:
s
-f
-- Returns:
-
fromTime_t
- Parameters:
secsSince1Jan1970UTC
-- Returns:
- Since:
- This function was introduced in Qt 4.2.
-
fromTime_t
- Parameters:
secsSince1Jan1970UTC
-timeZone
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
fromTime_t
- Parameters:
secsSince1Jan1970UTC
-spec
-offsetFromUtc
-- Returns:
- Since:
- This function was introduced in Qt 5.2.
-
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(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
. -
fromSecsSinceEpoch
Overloaded function for
fromSecsSinceEpoch(long, io.qt.core.Qt.TimeSpec, int)
with:
spe = io.qt.core.Qt.TimeSpec.LocalTime
offsetFromUtc = 0
-
fromString
Overloaded function for
fromString(java.lang.String, io.qt.core.Qt.DateFormat)
withf = io.qt.core.Qt.DateFormat.TextDate
. -
fromTime_t
Overloaded function for
fromTime_t(int, io.qt.core.Qt.TimeSpec, int)
withoffsetFromUtc = 0
.
-