Options
All
  • Public
  • Public/Protected
  • All
Menu

Gregorian2 calendar

Hierarchy

Index

Constructors

Properties

#id: string
#type: string

Accessors

  • get id(): string
  • get type(): string
  • Calendar's type (Gregorian, Chiness, Persian, Islamic, ...). It is possible that you have multiple calendars with the same type and different ID's (multiple implementations for a specific calendar).

    Returns string

Methods

  • add(ts: number, units: Partial<DateTimeUnits>): number
  • Adds a period of time to a timestamp and returns the resulting timestamp.

    Parameters

    • ts: number
    • units: Partial<DateTimeUnits>

    Returns number

  • addMonths(time: number, months: number): number
  • addYears(time: number, years: number): number
  • dayOfYear(time: number): number
  • daysInMonth(year: number, month: number): number
  • daysInYear(year: number): number
  • getTimestamp(units: DateTimeUnits): number
  • getUnits(ts: number): DateTimeUnits
  • isLeapYear(year: number): boolean
  • isValid(year: number, month: number, day: number): boolean
  • subtract(ts: number, units: Partial<DateTimeUnits>): number
  • weekDay(time: number): number
  • weekNumber(ts: number, firstDayOfWeek: number, offset?: number): number

Generated using TypeDoc