QDateTime

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QDateTime(arg?: NativeElement, time?: NativeElement): QDateTime

Overrides Component.constructor

Parameters:

NameType
arg?NativeElement
time?NativeElement

Returns: QDateTime

Properties

native

• native: NativeElement | null

Inherited from Component.native

Methods

addDays

â–¸ addDays(ndays: number): QDateTime

Parameters:

NameType
ndaysnumber

Returns: QDateTime


addMSecs

â–¸ addMSecs(msecs: number): QDateTime

Parameters:

NameType
msecsnumber

Returns: QDateTime


addMonths

â–¸ addMonths(nmonths: number): QDateTime

Parameters:

NameType
nmonthsnumber

Returns: QDateTime


addSecs

â–¸ addSecs(s: number): QDateTime

Parameters:

NameType
snumber

Returns: QDateTime


addYears

â–¸ addYears(nyears: number): QDateTime

Parameters:

NameType
nyearsnumber

Returns: QDateTime


date

â–¸ date(): QDate

Returns: QDate


daysTo

â–¸ daysTo(other: QDateTime): number

Parameters:

NameType
otherQDateTime

Returns: number


isDaylightTime

â–¸ isDaylightTime(): boolean

Returns: boolean


isNull

â–¸ isNull(): boolean

Returns: boolean


isValid

â–¸ isValid(): boolean

Returns: boolean


msecsTo

â–¸ msecsTo(other: QDateTime): number

Parameters:

NameType
otherQDateTime

Returns: number


offsetFromUtc

â–¸ offsetFromUtc(): number

Returns: number


secsTo

â–¸ secsTo(other: QDateTime): number

Parameters:

NameType
otherQDateTime

Returns: number


setDate

â–¸ setDate(date: QDate): void

Parameters:

NameType
dateQDate

Returns: void


setMSecsSinceEpoch

â–¸ setMSecsSinceEpoch(msecs: number): void

Parameters:

NameType
msecsnumber

Returns: void


setOffsetFromUtc

â–¸ setOffsetFromUtc(offsetSeconds: number): void

Parameters:

NameType
offsetSecondsnumber

Returns: void


setSecsSinceEpoch

â–¸ setSecsSinceEpoch(secs: number): void

Parameters:

NameType
secsnumber

Returns: void


setTime

â–¸ setTime(time: QTime): void

Parameters:

NameType
timeQTime

Returns: void


setTimeSpec

â–¸ setTimeSpec(spec: TimeSpec): void

Parameters:

NameType
specTimeSpec

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:

NameType
offsetSecondsnumber

Returns: QDateTime


toSecsSinceEpoch

â–¸ toSecsSinceEpoch(): number

Returns: number


toString

â–¸ toString(format: string | DateFormat): string

Parameters:

NameType
formatstring | DateFormat

Returns: string


toTimeSpec

â–¸ toTimeSpec(spec: TimeSpec): QDateTime

Parameters:

NameType
specTimeSpec

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:

NameType
variantQVariant

Returns: QDateTime


Static fromString

â–¸ fromString(dateTimeString: string, format: string | DateFormat): QDateTime

Parameters:

NameType
dateTimeStringstring
formatstring | DateFormat

Returns: QDateTime