Windows Dev Center

Erweitern Minimieren

Kalender Class

Bearbeitet die Darstellung eines Datums und einer Uhrzeit in einem bestimmten Kalender und einer Uhr.

Syntax


var calendar = new Windows.Globalization.Calendar(iIterable(String));
var calendar = new Windows.Globalization.Calendar(iIterable(String));
var calendar = new Windows.Globalization.Calendar(iIterable(String));
var calendar = new Windows.Globalization.Calendar();

Attribute

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Member

CalendarKlasse hat diese Membertypen:

Konstruktoren

CalendarKlasse hat diese Konstruktoren.

KonstruktorBeschreibung
Calendar() Creates a Calendar object and initializes it to the current date and time.
Calendar(IIterable(String)) Creates a Calendar object that is initialized with a language list.
Calendar(IIterable(String), String, String) Creates a Calendar object that is initialized with a language list, calendar, and clock.
Calendar(IIterable(String), String, String, String) Creates a Calendar object that is initialized with a language list, calendar, clock, and time zone.

 

Methoden

The Calendar Klasse hat diese Methoden. Mit C#, Visual Basic und C++ erbt es auch Methoden aus Object Klasse.

MethodeBeschreibung
AddDays Increments or decrements the day.
AddEras Increments or decrements the era.
AddHours Increments or decrements the hour.
AddMinutes Increments or decrements the minute.
AddMonths Increments or decrements the month.
AddNanoseconds Increments or decrements the nanosecond.
AddPeriods Increments or decrements the period.
AddSeconds Increments or decrements the second.
AddWeeks Increments or decrements the day by the specified number of weeks.
AddYears Increments or decrements the year.
ChangeCalendarSystem Sets a new calendar system to be used by this Calendar object.
ChangeClock Sets a new clock to be used by this Calendar object.
ChangeTimeZone Sets a new time zone to be used by this Calendar object.
Clone Creates a copy of the Calendar object.
Compare Compares this calendar to another Calendar object and indicates whether the date and time of one is earlier, equal to, or later than that of the other.
CompareDateTime Compares this calendar to a DateTime object and indicates whether the date and time of one is earlier, equal to, or later than that of the other.
CopyTo Copies the values from another Calendar object into this Calendar.
DayAsPaddedString Returns a string representation of the day, optionally zero-padded.
DayAsString Returns a string that contains the numeric representation of the day.
DayOfWeekAsSoloString() Returns a string representation of the day of the week suitable for stand-alone display.
DayOfWeekAsSoloString(Int32) Returns a string representation of the day of the week suitable for stand-alone display.
DayOfWeekAsString() Returns a string representation of the day of the week suitable for inclusion with other date components.
DayOfWeekAsString(Int32) Returns a string representation of the day of the week suitable for inclusion with other date components.
EraAsString() Returns a string representation of the era.
EraAsString(Int32) Returns a string representation of the era. The string chosen is closest in length to the ideal length.
GetCalendarSystem Gets the calendar system that is used by this Calendar object.
GetClock Gets the clock that is used by this Calendar object.
GetDateTime Builds a date and time, given the components of this Calendar object.
GetTimeZone Gets the identifier that identifies the time zone that is used by this Calendar object.
HourAsPaddedString Returns a string representation of the hour, optionally zero-padded.
HourAsString Returns a string that contains the numeric representation of the hour.
MinuteAsPaddedString Returns a string representation of the minute, optionally zero-padded.
MinuteAsString Returns a string that contains the numeric representation of the minute.
MonthAsNumericString Returns a string that contains the numeric representation of the month.
MonthAsPaddedNumericString Returns a string representation of the month, optionally zero-padded.
MonthAsSoloString() Returns a string representation of the month suitable for stand-alone display.
MonthAsSoloString(Int32) Returns a string representation of the month suitable for stand-alone display.
MonthAsString() Returns a string representation of the month suitable for inclusion with other date components.
MonthAsString(Int32) Returns a string representation of the month suitable for inclusion with other date components.
NanosecondAsPaddedString Returns a string representation of the nanosecond, optionally zero-padded.
NanosecondAsString Returns a string that contains the numeric representation of the nanosecond.
PeriodAsString() Returns a string representation of the day period, such as AM or PM, that uses the most common abbreviation available.
PeriodAsString(Int32) Returns a string representation of the day period, such as AM or PM.
SecondAsPaddedString Returns a string representation of the second, optionally zero-padded.
SecondAsString Returns a string that contains the numeric representation of the second.
SetDateTime Sets all the date and time fields to the date and time represented by the DateTime parameter.
SetToMax Sets the components of this Calendar object to the latest date and time that are supported.
SetToMin Sets the components of this Calendar object to the earliest date and time that are supported.
SetToNow Sets the components of this Calendar object to the current date and time.
TimeZoneAsString() Returns the full time zone name applicable at the instant of time that this Calendar object represents.
TimeZoneAsString(Int32) Returns the abbreviated time zone name applicable at the instant of time that this Calendar object represents.
YearAsPaddedString Returns a string representation of the year, optionally zero-padded.
YearAsString Returns a string representation of the year without any initial zero padding.
YearAsTruncatedString Returns a string representation of the year, optionally truncated.

 

Eigenschaften

Der CalendarKlasse hat diese Eigenschaften.

EigenschaftZugriffstypBeschreibung

Day

Lese-/SchreibzugriffGets or sets the day.

DayOfWeek

SchreibgeschütztGets the day of the week.

Era

Lese-/SchreibzugriffGets or sets the era.

FirstDayInThisMonth

SchreibgeschütztGets the first Day of the current Month.

FirstEra

SchreibgeschütztGets the first Era available in the calendar.

FirstHourInThisPeriod

SchreibgeschütztGets the first Hour of the current Period.

FirstMinuteInThisHour

SchreibgeschütztGets the first Minute of the current Hour.

FirstMonthInThisYear

SchreibgeschütztGets the first Month of the current Year.

FirstPeriodInThisDay

SchreibgeschütztGets the first Period of the current Day.

FirstSecondInThisMinute

SchreibgeschütztGets the first Second of the current Minute.

FirstYearInThisEra

SchreibgeschütztGets the first Year of the current Era.

Hour

Lese-/SchreibzugriffGets or sets the hour.

IsDaylightSavingTime

SchreibgeschütztGets a Boolean indicating if Daylight Saving Time is in effect for the date of this Calendar object.

Languages

SchreibgeschütztGets the priority list of language identifiers that is used when formatting components as strings.

LastDayInThisMonth

SchreibgeschütztGets the last Day of the current Month.

LastEra

SchreibgeschütztGets the last Era available in the calendar.

LastHourInThisPeriod

SchreibgeschütztGets the last Hour of the current Period.

LastMinuteInThisHour

SchreibgeschütztGets the last Minute of the current Hour.

LastMonthInThisYear

SchreibgeschütztGets the last Month of the current Year.

LastPeriodInThisDay

SchreibgeschütztGets the last Period of the current Day.

LastSecondInThisMinute

SchreibgeschütztGets the last Second of the current Minute.

LastYearInThisEra

SchreibgeschütztGets the last Year of the current Era.

Minute

Lese-/SchreibzugriffGets or sets the minute.

Month

Lese-/SchreibzugriffGets or sets the month.

Nanosecond

Lese-/SchreibzugriffGets or sets the nanosecond.

NumberOfDaysInThisMonth

SchreibgeschütztGets the number of days in the current month of this Calendar object.

NumberOfEras

SchreibgeschütztGets the number of eras in this Calendar object.

NumberOfHoursInThisPeriod

SchreibgeschütztGets the number of hours in the current day period of this Calendar object.

NumberOfMinutesInThisHour

SchreibgeschütztGets the number of Minutes in the current Hour.

NumberOfMonthsInThisYear

SchreibgeschütztGets the number of months in the current year of this Calendar object.

NumberOfPeriodsInThisDay

SchreibgeschütztGets the number of periods in the current day of this Calendar object.

NumberOfSecondsInThisMinute

SchreibgeschütztGets the number of Seconds in the current Minute.

NumberOfYearsInThisEra

SchreibgeschütztGets the number of years in the current era of this Calendar object.

NumeralSystem

Lese-/SchreibzugriffGets or sets the numbering system that is used when formatting components as strings.

Period

Lese-/SchreibzugriffGets or sets the period of the current day.

ResolvedLanguage

SchreibgeschütztGets the language that was most recently used to perform calendar formatting or operations.

Second

Lese-/SchreibzugriffGets or sets the second.

Year

Lese-/SchreibzugriffGets or sets the year.

 

Hinweise

Wenn die App in dieser Klasse verwendete Sprachentags an beliebige National Language Support-Funktionen übergibt, müssen die Tags zuvor durch den Aufruf von ResolveLocaleName konvertiert werden.

Anforderungen

Mindestens unterstützter Client

Windows 8 [Windows Store-Apps, Desktop-Apps]

Mindestens unterstützter Server

Windows Server 2012 [Windows Store-Apps, Desktop-Apps]

Namespace

Windows.Globalization
Windows::Globalization [C++]

Metadaten

Windows.winmd

 

 

Anzeigen:
© 2015 Microsoft