dhlab-basel / JDNConvertibleCalendar

Different calendars can be freely converted using Julian Day Number
GNU Affero General Public License v3.0
4 stars 3 forks source link

Construct Calendar Date from one Date #9

Open tobiasschweizer opened 5 years ago

tobiasschweizer commented 5 years ago

Currently, a calendar date can be constructed using either of these two signatures:

  1. constructor(period: JDNPeriod);

  2. constructor(period: CalendarPeriod);

In addition, the following signatures should be supported:

In these cases, JDNConvertibleCalendar would create a period where start and end dates are equal.

relates to https://github.com/dhlab-basel/JDNConvertibleCalendarDateAdapter/pull/9#issuecomment-470711760

Users might find it convenient to use constructor(year: number, month: number, day: number);. But the same effect can be achieved doing new JulianCalendarDate(new CalendarDate(1729, 10, 13));.