System.Globalization.CCHebrewCalendar.last_month_of_year C# (CSharp) Method

last_month_of_year() public static method

The Method gives the number of the last month in a year, which is equal with the number of month in a Hebrew year.
public static last_month_of_year ( int year ) : int
year int An integer representing the Hebrew year. ///
return int
	public static int last_month_of_year(int year) {
		return is_leap_year(year) ? 13 : 12;
	}

Usage Example

Example #1
0
        public static int fixed_from_dmy(int day, int month, int year)
        {
            int num = -1373428;

            num += CCHebrewCalendar.elapsed_days(year);
            num += CCHebrewCalendar.new_year_delay(year);
            if (month < 7)
            {
                int num2 = CCHebrewCalendar.last_month_of_year(year);
                for (int i = 7; i <= num2; i++)
                {
                    num += CCHebrewCalendar.last_day_of_month(i, year);
                }
                for (int i = 1; i < month; i++)
                {
                    num += CCHebrewCalendar.last_day_of_month(i, year);
                }
            }
            else
            {
                for (int i = 7; i < month; i++)
                {
                    num += CCHebrewCalendar.last_day_of_month(i, year);
                }
            }
            return(num + day);
        }
All Usage Examples Of System.Globalization.CCHebrewCalendar::last_month_of_year