GregorianCalendar Class : GregorianCalendar « Date Time « C# / C Sharp






GregorianCalendar Class

 

using System;
using System.Globalization;

public class SamplesGregorianCalendar  {

   public static void Main()  {
      String strADPunc = "A.D.";
      String strADNoPunc = "AD";
      String strCEPunc = "C.E.";
      String strCENoPunc = "CE";

      foreach ( CultureInfo myCI in CultureInfo.GetCultures( CultureTypes.SpecificCultures ) )  {
         Console.Write(myCI );
         Console.Write(myCI.DateTimeFormat.GetEra( strADPunc ));
         Console.Write(myCI.DateTimeFormat.GetEra( strADNoPunc ) );
         Console.Write(myCI.DateTimeFormat.GetEra( strCEPunc ));
         Console.Write(myCI.DateTimeFormat.GetEra( strCENoPunc ) );
         Console.Write(myCI.Calendar );
      }
   }
}

   
  








Related examples in the same category

1.GregorianCalendar Constructor
2.GregorianCalendar.AddMonths
3.GregorianCalendar.GetDayOfMonth
4.GregorianCalendar.GetDaysInMonth
5.GregorianCalendar.GetDaysInYear
6.GregorianCalendar.GetMonthsInYear
7.GregorianCalendar.GetWeekOfYear
8.GregorianCalendar.IsLeapDay
9.GregorianCalendar.IsLeapMonth
10.GregorianCalendar.IsLeapYear
11.GregorianCalendar.MaxSupportedDateTime
12.GregorianCalendarTypes Enumeration