Gets the Umm Al Qura Year. - CSharp System

CSharp examples for System:DateTime Year

Description

Gets the Umm Al Qura Year.

Demo Code


using System.Text;
using System.Linq;
using System.Globalization;
using System.Collections.Generic;
using System;/*from   w ww  .j a  v  a 2  s . c o m*/

public class Main{
        #region [ Extension Methods ]

        /// <summary>
        /// Gets the UmAlQura Year.
        /// </summary>
        /// <param name="source">The source.</param>
        /// <returns>UmAlQura Year</returns>
        public static int GetUmAlQuraYear(this DateTime source)
        {
            System.Globalization.UmAlQuraCalendar calendar = new System.Globalization.UmAlQuraCalendar();
            return calendar.GetYear(source);
        }
}

Related Tutorials