Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a calendar date (calendar agnostic).

Assumes that every supported calendar can be represented by a combination of year, month, and day.

Hierarchy

  • CalendarDate

Index

Constructors

Properties

Constructors

constructor

  • new CalendarDate(year: number, month: number, day: number, dayOfWeek?: undefined | number, daytime?: undefined | number): CalendarDate
  • Please note that this software uses the (astronomical) convention that BCE dates are represented as negative years and that the year zero (0) is used. The year 1 BCE must be indicated as year 0, and the year 2 BCE corresponds to -1 etc.

    Parameters

    • year: number

      year of the given date.

    • month: number

      month of the given date.

    • day: number

      day of the given date (day of month, 1 based index).

    • Optional dayOfWeek: undefined | number

      day of week of the given date (0 based index), if any.

    • Optional daytime: undefined | number

      time of the day (0 - 0.9…), if any. 0 refers to midnight, 0.5 to noon, 0.9… to midnight of the same day. 1 would already refer to the next day and is thus not valid.

    Returns CalendarDate

Properties

day

day: number

day of the given date (day of month, 1 based index).

Optional dayOfWeek

dayOfWeek: undefined | number

day of week of the given date (0 based index), if any.

Optional daytime

daytime: undefined | number

time of the day (0 - 0.9…), if any. 0 refers to midnight, 0.5 to noon, 0.9… to midnight of the same day. 1 would already refer to the next day and is thus not valid.

month

month: number

month of the given date.

year

year: number

year of the given date.

Generated using TypeDoc