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

year_from_fixed() public static méthode

The method computes the Islamic year from a fixed day number.
public static year_from_fixed ( int date ) : int
date int The fixed day number. ///
Résultat int
	public static int year_from_fixed(int date) {
		return CCMath.div(30*(date-epoch)+10646, 10631);
	}

Usage Example

Exemple #1
0
        /// <summary>
        /// Overridden. Gives the number of the year of the specified
        /// date.
        /// </summary>
        /// <param name="time">The
        /// <see cref="T:System.DateTime"/> that specifies a
        /// date.
        /// </param>
        /// <returns>An integer representing the year,
        /// starting with 1.</returns>
        /// <exception cref="T:System.ArgumentOutOfRangeException">
        /// The exception is thrown if the
        /// <see cref="T:System.DateTime"/> parameter is not in the
        /// supported range of the Hijri calendar.
        /// </exception>
        public override int GetYear(DateTime time)
        {
            int rd = M_FromDateTime(time);

            M_CheckFixedHijri("time", rd);
            return(CCHijriCalendar.year_from_fixed(rd));
        }
All Usage Examples Of System.Globalization.CCHijriCalendar::year_from_fixed