static GregorianJulianCalendars() { var julianCalculator = new JulianYearMonthDayCalculator(); Julian = new CalendarSystem(CalendarOrdinal.Julian, JulianId, JulianName, new JulianYearMonthDayCalculator(), 4, new GJEraCalculator(julianCalculator)); // Variations for the calendar systems which have different objects for different "minimum first day of week" // values. These share eras and year/month/day calculators where appropriate. GregorianByMinWeekLength = new CalendarSystem[7]; for (int i = 1; i <= 7; i++) { // CalendarOrdinal is set up to make this simple :) // The calculators are pinched from the ISO calendar system as they're the same for all of these calendar systems. GregorianByMinWeekLength[i - 1] = new CalendarSystem((CalendarOrdinal)i, GetGregorianId(i), GregorianName, IsoCalendarSystem.YearMonthDayCalculator, i, IsoCalendarSystem.eraCalculator); } }
static GregorianJulianCalendars() { var julianCalculator = new JulianYearMonthDayCalculator(); Julian = new CalendarSystem(CalendarOrdinal.Julian, JulianId, JulianName, julianCalculator, new GJEraCalculator(julianCalculator)); Gregorian = new CalendarSystem(CalendarOrdinal.Gregorian, GregorianId, GregorianName, IsoCalendarSystem.YearMonthDayCalculator, IsoCalendarSystem.eraCalculator); }