System.Globalization.CCJulianCalendar.my_from_fixed C# (CSharp) Method

my_from_fixed() public static method

The method computes the Julian year and month from a fixed day number.
public static my_from_fixed ( int &month, int &year, int date ) : void
month int The output value giving the Julian month. ///
year int The output value giving the Julian year. ///
date int An integer value specifying the fixed day /// number.
return void
	public static void my_from_fixed(out int month, out int year, int date)
	{
		year = year_from_fixed(date);

		int prior_days = date - fixed_from_dmy(1, (int)Month.january,
			year);
		
		int correction;
		if (date < fixed_from_dmy(1, (int)Month.march, year)) {
			correction = 0;
		} else if (is_leap_year(year)) {
			correction = 1;
		} else {
			correction = 2;
		}

		month = CCMath.div(12 * (prior_days + correction) + 373, 367);
	}
	

Usage Example

        public static int month_from_fixed(int date)
        {
            int result;
            int num;

            CCJulianCalendar.my_from_fixed(out result, out num, date);
            return(result);
        }
All Usage Examples Of System.Globalization.CCJulianCalendar::my_from_fixed