VB.Net/Development/Calendar

Материал из VB Эксперт
Перейти к: навигация, поиск

Calendar Localization

  
Imports System
Imports System.Globalization
Module Module1
    Sub Main()
       Dim MyCalendar As Calendar = New GregorianCalendar()
      "Dim MyCalendar As Calendar = New HebrewCalendar()
      Dim MyDate As New DateTime(2001, 8, 22, 15, 30, 0, 0)
      Dim MyCulture As CultureInfo = New CultureInfo("es-ES")
      Console.WriteLine(MyCalendar.AddMinutes(MyDate, 15).ToString("G", MyCulture))
      Console.WriteLine(MyCalendar.TwoDigitYearMax)
      Console.WriteLine(MyCalendar.ToFourDigitYear(32))
      Console.WriteLine(MyCalendar.ToFourDigitYear(28))
    End Sub
End Module