Options
All
  • Public
  • Public/Protected
  • All
Menu

Tick DateTime.

Hierarchy

  • DateTime

Index

Constructors

Properties

#l: Locale
#ts: number
#units: DateTimeUnits
#z: Zone

Accessors

  • get day(): number
  • get hour(): number
  • get minute(): number
  • get month(): number
  • get ms(): number
  • get second(): number
  • get ts(): number
  • Gets the timestamp of this object.

    description

    This value is usually the number of milliseconds since January 1, 1970 (EPOCH) and it can be a positive or negetive number (it depends on the implementation of the Calendar).

    Returns number

  • get year(): number

Methods

  • Adds a period of time to this DateTime and returns the resulting DateTime.

    Parameters

    • units: DateTimeUnits

      DateTimeUnits

    Returns DateTime

  • clone(newUnits?: DateTimeUnits): DateTime
  • Clones this DateTime with overwriten new unit values.

    Parameters

    • Optional newUnits: DateTimeUnits

    Returns DateTime

  • subtract(units: DateTimeUnits): DateTime
  • Subtracts a period of time from this DateTime and returns the resulting DateTime.

    Parameters

    • units: DateTimeUnits

      DateTimeUnits

    Returns DateTime

  • to(calendar: CalendarSpecifier): DateTime
  • Returns a new DateTime equivalent with this DateTime but with a different Calendar

    Parameters

    • calendar: CalendarSpecifier

      CalendarSpecifier

    Returns DateTime

  • toLocale(locale: LocaleSpecifier): DateTime
  • Returns a new DateTime equivalent with this DateTime but with a different Locale

    Parameters

    • locale: LocaleSpecifier

    Returns DateTime

  • toObject(): DateTimeUnits
  • Returns a new DateTime equivalent with this DateTime but with a different Zone

    Parameters

    • zone: ZoneSpecifier

    Returns DateTime

Generated using TypeDoc