Options
All
  • Public
  • Public/Protected
  • All
Menu

Hijri(Islamic) calendar

Hierarchy

Index

Constructors

  • new HijriCalendar(id: string, hijriAdjustment: number): HijriCalendar

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
  • Adds the specified number of months to the given timestamp and returns the resulting timestamp.

    Parameters

    • time: number
    • months: number

    Returns number

  • addYears(time: number, years: number): number
  • Adds the specified number of years to the given timestamp and returns the resulting timestamp.

    Parameters

    • time: number
    • years: number

    Returns number

  • dayOfYear(time: number): number
  • daysInMonth(year: number, month: number): number
  • Returns the number of days in the given year and month. The month count starts with 1, up to 12.

    Parameters

    • year: number
    • month: number

    Returns 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