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






GregorianCalendar Constructor

 
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.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