Options
All
  • Public
  • Public/Protected
  • All
Menu

A time zone aware date class.

Hierarchy

  • DateTz

Index

Constructors

  • new DateTz(tz?: Timezone): DateTz
  • new DateTz(value: number): DateTz
  • new DateTz(dateString: string): DateTz
  • new DateTz(dateObject: Date): DateTz
  • new DateTz(dateTz: DateTz): DateTz
  • new DateTz(value: number, tz?: Timezone): DateTz
  • new DateTz(dateString: string, tz?: Timezone): DateTz
  • new DateTz(dateObject: Date, tz?: Timezone): DateTz
  • new DateTz(year: number, month: number, day: number, tz?: Timezone): DateTz
  • new DateTz(year: number, month: number, day: number, hours: number, tz?: Timezone): DateTz
  • new DateTz(year: number, month: number, day: number, hours: number, minutes: number, tz?: Timezone): DateTz
  • new DateTz(year: number, month: number, day: number, hours: number, minutes: number, seconds: number, tz?: Timezone): DateTz
  • new DateTz(year: number, month: number, day: number, hours: number, minutes: number, seconds: number, milliseconds: number, tz?: Timezone): DateTz
  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • value: number

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • dateString: string

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • dateObject: Date

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • year: number
    • month: number
    • day: number
    • Optional tz: Timezone

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • year: number
    • month: number
    • day: number
    • hours: number
    • Optional tz: Timezone

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • year: number
    • month: number
    • day: number
    • hours: number
    • minutes: number
    • Optional tz: Timezone

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • year: number
    • month: number
    • day: number
    • hours: number
    • minutes: number
    • seconds: number
    • Optional tz: Timezone

    Returns DateTz

  • Constructs a date.

    As with the built in Date constructor there are five basic forms of the constructor. In all cases the last parameter is an optional time zone. If absent the default is the local time zone.

    No date parameters: the current date and time.

    An integer value of the number of milliseconds since 1970-01-01T00:00:00+00:00.

    A date string.

    A Date object.

    In addition to the above a DateTz object may be passed.

    Parameters

    • year: number
    • month: number
    • day: number
    • hours: number
    • minutes: number
    • seconds: number
    • milliseconds: number
    • Optional tz: Timezone

    Returns DateTz

Accessors

  • get date(): Date
  • get day(): number
  • get hours(): number
  • get isDaylightSavings(): boolean
  • True if the date is subject to daylight savings.

    Returns boolean

  • get milliseconds(): number
  • The milliseconds of the second.

    Returns number

  • get minutes(): number
  • get month(): number
  • The month, where 1 is January.

    Returns number

  • get offset(): number
  • The offset from UTC in minutes.

    Returns number

  • get seconds(): number
  • The seconds of the minute.

    Returns number

  • get weekday(): number
  • get year(): number

Methods

  • getTime(): number
  • Get the time in milliseconds since 1970-01-01T00:00:00+00:00.

    Returns number

  • toISOString(): string
  • toString(): string
  • Return a string representation.

    Returns string

  • valueOf(): number
  • Get the value as a number

    Returns number

Generated using TypeDoc