Open gautschr opened 4 years ago
export class JewishCalendarDate extends JDNConvertibleCalendar {
public readonly calendarName = JDNConvertibleCalendar.jewish;
// Determine the number of months of a certain Jewish year
public readonly monthsInYear = 13;
monthsInYear
has to be a method that takes the year as an argument. In case of the Jewish calendar, it has to call JDNConvertibleConversionModule.JewishCharact(jewishYear)
. For the other calendars, 12 will be returned.
handleMonthTransposition
has to determine the number of months in each year
// get remaining months to shift: max. this.monthsInYear - 1
const monthsToShift = Math.abs(months) % this.monthsInYear;
The following cases have to be handled correctly:
months
is > 6 or < 8:
months
is 1, then it has to shift to month 8. If the current month is 8 and months
is -1, then it has to shift to month 6.months
<= nmo -> do shift considering 1.months
> nmo -> get number of months (nmo) for following/previous year, repeat above until months
exceeded@tobiasschweizer any updates for this PR?
@tobiasschweizer any updates for this PR?
No, unfortunately not. Sadly, I don't have any time to work on this PR. Could you help in some way? Even just figuring out the algorithm for the months would be a big help.
@emargareten Would you have any resources to help figure out the algorithm for dealing with the months?
Number of possible months in a year has to be adjusted in order to correct Jewish month lengths correctly.