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