This calendar class implements the Hebrew calendar. This complicated calendar determines leap years within a 19-year cycle. The 3rd, 6th, 8th, 11th, 14th, 17th, and 19th years are leap years. Regular years have 12 months and between 353 to 355 days, leap years have 13 months and between 383 to 385 days; the variance is determined by the placement of Jewish holidays. This implementation recognizes the years 5343 to 6000 (A.M.), which is equivalent to the Gregorian years 1582 to 2240.

public class HebrewCalendar : Calendar {
// Public Constructors
   public method HebrewCalendar();  
// Public Static Fields
   public static readonly field int HebrewEra;                   // =1
                  // Public Instance Properties
   public override field int[] Eras{get; }                       // overrides Calendar
   public override field int TwoDigitYearMax{set; get; }         // overrides Calendar
                  // Public Instance Methods
   public override method DateTime AddMonths(DateTime time,      // overrides Calendar
        int months);  
   public override method DateTime AddYears(DateTime time,       // overrides Calendar
        int years);  
   public override method int GetDayOfMonth(DateTime time);     // overrides Calendar
   public override method DayOfWeek GetDayOfWeek(               // overrides Calendar
        DateTime time);  
   public override method int GetDayOfYear(DateTime time);      // overrides Calendar
   public override method int GetDaysInMonth(int year,           // overrides Calendar
        int month, int era);  
   public override method int GetDaysInYear(int year,            // overrides Calendar
        int era); public override method ...

Get C# in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.