本文整理匯總了C#中System.Globalization.UmAlQuraCalendar.IsLeapYear方法的典型用法代碼示例。如果您正苦於以下問題:C# UmAlQuraCalendar.IsLeapYear方法的具體用法?C# UmAlQuraCalendar.IsLeapYear怎麽用?C# UmAlQuraCalendar.IsLeapYear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。
在下文中一共展示了UmAlQuraCalendar.IsLeapYear方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Main
//引入命名空間
using System;
using System.Globalization;
public class Example
{
public static void Main()
{
Calendar cal = new UmAlQuraCalendar();
int currentYear = cal.GetYear(DateTime.Now);
for (int year = currentYear; year <= currentYear + 9; year++)
Console.WriteLine("{0:d4}: {1} days {2}", year,
cal.GetDaysInYear(year, UmAlQuraCalendar.UmAlQuraEra),
cal.IsLeapYear(year, UmAlQuraCalendar.UmAlQuraEra) ?
"(Leap Year)" : "");
}
}
輸出:
1431: 354 days 1432: 354 days 1433: 355 days (Leap Year) 1434: 354 days 1435: 355 days (Leap Year) 1436: 354 days 1437: 354 days 1438: 354 days 1439: 355 days (Leap Year) 1440: 354 days