System.Globalization.CCHijriCalendar.dmy_from_fixed C# (CSharp) Méthode

dmy_from_fixed() public static méthode

The method computes the Islamic year, month, and day from a fixed day number.
public static dmy_from_fixed ( int &day, int &month, int &year, int date ) : void
day int The output value returning the day of the /// month. ///
month int The output value giving the Islamic month. ///
year int The output value giving the Islamic year. ///
date int An integer value specifying the fixed day /// number.
Résultat void
	public static void dmy_from_fixed(out int day, out int month,
		out int year, int date)
	{
		my_from_fixed(out month, out year, date);
		day = date - fixed_from_dmy(1, month, year) + 1;
	}

Usage Example

Exemple #1
0
 /// <summary>
 /// A protected method checking an
 /// <see cref="F:AddHijriDate"/> adjusted fixed day number.
 /// </summary>
 /// <param name="param">A string giving the name of the parameter
 /// to check.</param>
 /// <param name="rdHijri">An integer giving the AddHijriDate adjusted
 /// fixed day number.
 /// </param>
 /// <exception cref="T:System.ArgumentOutOfRangeException">
 /// Exception is thrown, if the AddHijriDate adjusted fixed day
 /// number is outside the supported range.
 /// </exception>
 internal void M_CheckFixedHijri(string param, int rdHijri)
 {
     if (rdHijri < M_MinFixed || rdHijri > M_MaxFixed - AddHijriDate)
     {
         StringWriter sw = new StringWriter();
         int          day, month, year;
         CCHijriCalendar.dmy_from_fixed(out day, out month,
                                        out year, M_MaxFixed - AddHijriDate);
         if (AddHijriDate != 0)
         {
             sw.Write("This HijriCalendar " +
                      "(AddHijriDate {0})" +
                      " allows dates from 1. 1. 1 to " +
                      "{1}. {2}. {3}.",
                      AddHijriDate,
                      day, month, year);
         }
         else
         {
             sw.Write("HijriCalendar allows dates from " +
                      "1.1.1 to {0}.{1}.{2}.",
                      day, month, year);
         }
         throw new ArgumentOutOfRangeException(param,
                                               sw.ToString());
     }
 }
All Usage Examples Of System.Globalization.CCHijriCalendar::dmy_from_fixed