QDateTime
Hierarchy
-
↳ QDateTime
Index
Constructors
Properties
Methods
- addDays
- addMSecs
- addMonths
- addSecs
- addYears
- date
- daysTo
- isDaylightTime
- isNull
- isValid
- msecsTo
- offsetFromUtc
- secsTo
- setDate
- setMSecsSinceEpoch
- setOffsetFromUtc
- setSecsSinceEpoch
- setTime
- setTimeSpec
- time
- timeSpec
- toLocalTime
- toMSecsSinceEpoch
- toOffsetFromUtc
- toSecsSinceEpoch
- toString
- toTimeSpec
- toUTC
- currentDateTime
- currentDateTimeUtc
- currentMSecsSinceEpoch
- currentSecsSinceEpoch
- fromQVariant
- fromString
Constructors
constructor
+ new QDateTime(arg?
: NativeElement, time?
: NativeElement): QDateTime
Overrides Component.constructor
Parameters:
Name | Type |
---|---|
arg? | NativeElement |
time? | NativeElement |
Returns: QDateTime
Properties
native
• native: NativeElement | null
Inherited from Component.native
Methods
addDays
▸ addDays(ndays
: number): QDateTime
Parameters:
Name | Type |
---|---|
ndays | number |
Returns: QDateTime
addMSecs
▸ addMSecs(msecs
: number): QDateTime
Parameters:
Name | Type |
---|---|
msecs | number |
Returns: QDateTime
addMonths
▸ addMonths(nmonths
: number): QDateTime
Parameters:
Name | Type |
---|---|
nmonths | number |
Returns: QDateTime
addSecs
▸ addSecs(s
: number): QDateTime
Parameters:
Name | Type |
---|---|
s | number |
Returns: QDateTime
addYears
▸ addYears(nyears
: number): QDateTime
Parameters:
Name | Type |
---|---|
nyears | number |
Returns: QDateTime
date
▸ date(): QDate
Returns: QDate
daysTo
▸ daysTo(other
: QDateTime): number
Parameters:
Name | Type |
---|---|
other | QDateTime |
Returns: number
isDaylightTime
▸ isDaylightTime(): boolean
Returns: boolean
isNull
▸ isNull(): boolean
Returns: boolean
isValid
▸ isValid(): boolean
Returns: boolean
msecsTo
▸ msecsTo(other
: QDateTime): number
Parameters:
Name | Type |
---|---|
other | QDateTime |
Returns: number
offsetFromUtc
▸ offsetFromUtc(): number
Returns: number
secsTo
▸ secsTo(other
: QDateTime): number
Parameters:
Name | Type |
---|---|
other | QDateTime |
Returns: number
setDate
▸ setDate(date
: QDate): void
Parameters:
Name | Type |
---|---|
date | QDate |
Returns: void
setMSecsSinceEpoch
▸ setMSecsSinceEpoch(msecs
: number): void
Parameters:
Name | Type |
---|---|
msecs | number |
Returns: void
setOffsetFromUtc
▸ setOffsetFromUtc(offsetSeconds
: number): void
Parameters:
Name | Type |
---|---|
offsetSeconds | number |
Returns: void
setSecsSinceEpoch
▸ setSecsSinceEpoch(secs
: number): void
Parameters:
Name | Type |
---|---|
secs | number |
Returns: void
setTime
▸ setTime(time
: QTime): void
Parameters:
Name | Type |
---|---|
time | QTime |
Returns: void
setTimeSpec
▸ setTimeSpec(spec
: TimeSpec): void
Parameters:
Name | Type |
---|---|
spec | TimeSpec |
Returns: void
time
▸ time(): QTime
Returns: QTime
timeSpec
▸ timeSpec(): TimeSpec
Returns: TimeSpec
toLocalTime
▸ toLocalTime(): QDateTime
Returns: QDateTime
toMSecsSinceEpoch
▸ toMSecsSinceEpoch(): number
Returns: number
toOffsetFromUtc
▸ toOffsetFromUtc(offsetSeconds
: number): QDateTime
Parameters:
Name | Type |
---|---|
offsetSeconds | number |
Returns: QDateTime
toSecsSinceEpoch
▸ toSecsSinceEpoch(): number
Returns: number
toString
▸ toString(format
: string | DateFormat): string
Parameters:
Name | Type |
---|---|
format | string | DateFormat |
Returns: string
toTimeSpec
▸ toTimeSpec(spec
: TimeSpec): QDateTime
Parameters:
Name | Type |
---|---|
spec | TimeSpec |
Returns: QDateTime
toUTC
▸ toUTC(): QDateTime
Returns: QDateTime
Static
currentDateTime
▸ currentDateTime(): QDateTime
Returns: QDateTime
Static
currentDateTimeUtc
▸ currentDateTimeUtc(): QDateTime
Returns: QDateTime
Static
currentMSecsSinceEpoch
▸ currentMSecsSinceEpoch(): number
Returns: number
Static
currentSecsSinceEpoch
▸ currentSecsSinceEpoch(): number
Returns: number
Static
fromQVariant
▸ fromQVariant(variant
: QVariant): QDateTime
Parameters:
Name | Type |
---|---|
variant | QVariant |
Returns: QDateTime
Static
fromString
▸ fromString(dateTimeString
: string, format
: string | DateFormat): QDateTime
Parameters:
Name | Type |
---|---|
dateTimeString | string |
format | string | DateFormat |
Returns: QDateTime