Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DateEnv

Index

Constructors

constructor

  • new DateEnv(settings: DateEnvSettings): DateEnv
  • Parameters

    • settings: DateEnvSettings

    Returns DateEnv

Properties

calendarSystem

calendarSystem: CalendarSystem

canComputeOffset

canComputeOffset: boolean

Optional cmdFormatter

cmdFormatter?: CmdFormatterFunc

defaultSeparator

defaultSeparator: string

locale

locale: Locale

namedTimeZoneImpl

namedTimeZoneImpl: NamedTimeZoneImpl

timeZone

timeZone: string

weekDow

weekDow: number

weekDoy

weekDoy: number

weekNumberFunc

weekNumberFunc: any

weekText

weekText: string

Methods

add

addMonths

  • addMonths(marker: Date, n: number): Date
  • Parameters

    • marker: Date
    • n: number

    Returns Date

addYears

  • Parameters

    • marker: Date
    • n: number

    Returns Date

computeWeekNumber

  • computeWeekNumber(marker: Date): number
  • Parameters

    Returns number

countDurationsBetween

createMarker

createMarkerMeta

createNowMarker

  • createNowMarker(): Date

diffWholeMonths

  • diffWholeMonths(m0: Date, m1: Date): number
  • Parameters

    Returns number

diffWholeYears

  • diffWholeYears(m0: Date, m1: Date): number
  • Parameters

    Returns number

format

  • format(marker: Date, formatter: DateFormatter, dateOptions?: { forcedTzo?: number }): string
  • Parameters

    • marker: Date
    • formatter: DateFormatter
    • Optional dateOptions: { forcedTzo?: number }
      • Optional forcedTzo?: number

    Returns string

formatIso

  • formatIso(marker: Date, extraOptions?: any): string
  • Parameters

    • marker: Date
    • Optional extraOptions: any

    Returns string

formatRange

  • formatRange(start: Date, end: Date, formatter: DateFormatter, dateOptions?: { defaultSeparator?: string; forcedEndTzo?: number; forcedStartTzo?: number; isEndExclusive?: boolean }): string
  • Parameters

    • start: Date
    • end: Date
    • formatter: DateFormatter
    • Optional dateOptions: { defaultSeparator?: string; forcedEndTzo?: number; forcedStartTzo?: number; isEndExclusive?: boolean }
      • Optional defaultSeparator?: string
      • Optional forcedEndTzo?: number
      • Optional forcedStartTzo?: number
      • Optional isEndExclusive?: boolean

    Returns string

getMonth

  • getMonth(marker: Date): number
  • Parameters

    Returns number

getYear

  • getYear(marker: Date): number
  • Parameters

    Returns number

greatestWholeUnit

  • greatestWholeUnit(m0: Date, m1: Date): { unit: string; value: number }
  • Parameters

    Returns { unit: string; value: number }

    • unit: string
    • value: number

offsetForMarker

  • offsetForMarker(m: Date): number
  • Parameters

    Returns number

parse

  • parse(s: string): { forcedTzo: any; isTimeUnspecified: boolean; marker: Date }
  • Parameters

    • s: string

    Returns { forcedTzo: any; isTimeUnspecified: boolean; marker: Date }

    • forcedTzo: any
    • isTimeUnspecified: boolean
    • marker: Date

startOf

  • Parameters

    Returns Date

startOfMonth

startOfWeek

startOfYear

subtract

timestampToMarker

  • timestampToMarker(ms: number): Date
  • Parameters

    • ms: number

    Returns Date

toDate

  • toDate(m: Date, forcedTzo?: number): Date
  • Parameters

    • m: Date
    • Optional forcedTzo: number

    Returns Date

Generated using TypeDoc