private static void AssembleFields(FieldSet.Builder builder, CalendarSystem @this)
        {
            // None of the fields will call anything on the calendar system *yet*, so this is safe enough.
            BasicCalendarSystem thisCalendar = (BasicCalendarSystem) @this;
            // First copy the fields that are the same for all basic
            // calendars
            builder.WithSupportedFieldsFrom(preciseFields);

            // Now create fields that have unique behavior for Gregorian and Julian
            // calendars.

            builder.Year = new BasicYearDateTimeField(thisCalendar);
            builder.YearOfEra = new GJYearOfEraDateTimeField(builder.Year, thisCalendar);

            // Define one-based centuryOfEra and yearOfCentury.
            DateTimeField field = new OffsetDateTimeField(builder.YearOfEra, 99);
            builder.CenturyOfEra = new DividedDateTimeField(field, DateTimeFieldType.CenturyOfEra, 100);

            field = new RemainderDateTimeField((DividedDateTimeField)builder.CenturyOfEra);
            builder.YearOfCentury = new OffsetDateTimeField(field, DateTimeFieldType.YearOfCentury, 1);

            builder.Era = new GJEraDateTimeField(thisCalendar);
            builder.DayOfWeek = new GJDayOfWeekDateTimeField(thisCalendar, builder.Days);
            builder.DayOfMonth = new BasicDayOfMonthDateTimeField(thisCalendar, builder.Days);
            builder.DayOfYear = new BasicDayOfYearDateTimeField(thisCalendar, builder.Days);
            builder.MonthOfYear = new BasicMonthOfYearDateTimeField(thisCalendar, 2); // February is the leap month
            builder.WeekYear = new BasicWeekYearDateTimeField(thisCalendar);
            builder.WeekOfWeekYear = new BasicWeekOfWeekYearDateTimeField(thisCalendar, builder.Weeks);

            field = new RemainderDateTimeField(builder.WeekYear, DateTimeFieldType.WeekYearOfCentury, 100);
            builder.WeekYearOfCentury = new OffsetDateTimeField(field, DateTimeFieldType.WeekYearOfCentury, 1);
            // The remaining (imprecise) durations are available from the newly
            // created datetime fields.

            builder.Years = builder.Year.DurationField;
            builder.Centuries = builder.CenturyOfEra.DurationField;
            builder.Months = builder.MonthOfYear.DurationField;
            builder.WeekYears = builder.WeekYear.DurationField;
        }
 private static void AssembleFields(FieldSet.Builder builder, CalendarSystem @this, CalendarSystem baseCalendar, FieldAssembler assembler)
 {
     builder.WithSupportedFieldsFrom(baseCalendar.Fields);
     assembler(builder, @this);
 }