Skip to content

Commit 32de55b

Browse files
Merge pull request #2495 from arkrumbe/cal-identifier
Add cross-links between Calendar.ChangeCalendarSystem and CalendarIdentifiers pages
2 parents 31b2e4a + 784c3eb commit 32de55b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

windows.globalization/calendar_changecalendarsystem_1371050862.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Sets a new calendar system to be used by this [Calendar](calendar.md) object.
1414

1515
## -parameters
1616
### -param value
17-
The calendar identifier to use.
17+
The calendar identifier to use. This can be any identifier from the [CalendarIdentifiers](calendaridentifiers.md) class.
1818

1919
## -remarks
2020

windows.globalization/calendaridentifiers.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,19 @@ Contains the calendar identifiers for the supported calendars, as static propert
2727

2828
## -examples
2929

30+
The following example shows how to specify a [Calendar](calendar.md) system using the [ChangeCalendarSystem](changecalendarsystem.md) method.
31+
32+
```
33+
winrt::Windows::Globalization::Calendar calendar;
34+
calendar.ChangeCalendarSystem(winrt::Windows::Globalization::CalendarIdentifiers::Gregorian);
35+
// Perform Gregorian calendar calculations.
36+
...
37+
38+
calendar.ChangeCalendarSystem(winrt::Windows::Globalization::CalendarIdentifiers::Hebrew);
39+
// Perform Hebrew calendar calculations.
40+
...
41+
```
42+
3043
## -see-also
3144

3245
[Date and time formatting sample (Windows 10)](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DateTimeFormatting), [Calendar sample (Windows 10)](https://go.microsoft.com/fwlink/p/?LinkId=624043)

0 commit comments

Comments
 (0)