GregorianCalendarTypes Enumeration : GregorianCalendar « Date Time « C# / C Sharp






GregorianCalendarTypes Enumeration

 
using System;
using System.Globalization;
public class SamplesGregorianCalendar  {
   public static void Main()  {
      CultureInfo myCIdeDE = new CultureInfo("de-DE", false);
      CultureInfo myCIenUS = new CultureInfo("en-US", false);
      CultureInfo myCIfrFR = new CultureInfo("fr-FR", false);
      CultureInfo myCIruRU = new CultureInfo("ru-RU", false);

      Calendar myCal = new GregorianCalendar();
      myCIruRU.DateTimeFormat.Calendar = myCal;
      DateTime myDT = new DateTime( 2010, 1, 3, 13, 30, 45 );
      Console.WriteLine( "de-DE: {0}", myDT.ToString( "F", myCIdeDE ) );
      Console.WriteLine( "en-US: {0}", myDT.ToString( "F", myCIenUS ) );
      Console.WriteLine( "fr-FR: {0}", myDT.ToString( "F", myCIfrFR ) );
      Console.WriteLine( "ru-RU: {0}", myDT.ToString( "F", myCIruRU ) );
   }
}

   
  








Related examples in the same category

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