8000 Revised calendar classes for Reiwa era (#2224) · shdvr/dotnet-api-docs@974192e · GitHub
[go: up one dir, main page]

Skip to content

Commit 974192e

Browse files
author
Ron Petrusha
authored
Revised calendar classes for Reiwa era (dotnet#2224)
* Updated for Reiwa era * Revised reference topics for Reiwa era * Addressed feedback * Fixed bad link
1 parent a1bbbb2 commit 974192e

File tree

4 files changed

+44
-40
lines changed

4 files changed

+44
-40
lines changed

includes/calendar-era.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11

22
> [!IMPORTANT]
3-
> A new era in the <xref:System.Globalization.JapaneseCalendar> and <xref:System.Globalization.JapaneseLunisolarCalendar> begins on May 1, 2019. This change affects all applications that use these calendars. See [Handling a new era in the Japanese calendar in .NET](https://devblogs.microsoft.com/dotnet/handling-a-new-era-in-the-japanese-calendar-in-net/) for more information and to determine whether your applications are affected. See [Prepare your application for the Japanese era change](/windows/uwp/design/globalizing/japanese-era-change) for information on testing your applications on Windows systems to ensure their readiness for the era change.
4-
3+
> Eras in the Japanese calendars are basaed on the emperor's reign and are therefore expected to change. For example, May 1, 2019 marked the beginning of the Reiwa era in the <xref:System.Globalization.JapaneseCalendar> and <xref:System.Globalization.JapaneseLunisolarCalendar>. Such a change of era affects all applications that use these calendars. See [Handling a new era in the Japanese calendar in .NET](https://devblogs.microsoft.com/dotnet/handling-a-new-era-in-the-japanese-calendar-in-net/) for more information and to determine whether your applications are affected. See [Prepare your application for the Japanese era change](/windows/uwp/design/globalizing/japanese-era-change) for information on testing your applications on Windows systems to ensure their readiness for the era change. See [Working with eras](~/docs/standard/datetime/working-with-calendars.md#working-with-eras) for features in .NET that support calendard with multiple eras and for best practices when working with calendars that support multiple eras.

xml/System.Globalization/Calendar.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
A calendar divides time into units, such as weeks, months, and years. The number, length, and start of the divisions vary in each calendar.
5353
5454
> [!NOTE]
55-
> For information about using the calendar classes in the .NET Framework, see [Working with Calendars](~/docs/standard/datetime/working-with-calendars.md).
55+
> For information about using the calendar classes in .NET, see [Working with Calendars](~/docs/standard/datetime/working-with-calendars.md).
5656
5757
Any moment in time can be represented as a set of numeric values using a particular calendar. For example, a vernal equinox occurred at (1999, 3, 20, 8, 46, 0, 0.0) in the Gregorian calendar, that is, March 20, 1999 C.E. at 8:46:00:0.0. An implementation of <xref:System.Globalization.Calendar> can map any date in the range of a specific calendar to a similar set of numeric values, and <xref:System.DateTime> can map such sets of numeric values to a textual representation using information from <xref:System.Globalization.Calendar> and <xref:System.Globalization.DateTimeFormatInfo>. The textual representation can be culture-sensitive, for example, "8:46 AM March 20th 1999 AD" for the en-US culture, or culture-insensitive, for example, "1999-03-20T08:46:00" in ISO 8601 format.
5858
@@ -705,7 +705,7 @@
705705
706706
The month part of the resulting <xref:System.DateTime> is affected if the resulting day is outside the month of the specified <xref:System.DateTime>. The year part of the resulting <xref:System.DateTime> is affected if the resulting month is outside the year of the specified <xref:System.DateTime>. The era part of the resulting <xref:System.DateTime> is affected if the resulting year is outside the era of the specified <xref:System.DateTime>. The time-of-day part of the resulting <xref:System.DateTime> remains the same as the specified <xref:System.DateTime>.
707707
708-
In all .NET Framework classes derived from the <xref:System.Globalization.Calendar> class, a week is defined as seven days.
708+
In all .NET classes derived from the <xref:System.Globalization.Calendar> class, a week is defined as seven days.
709709
710710
The <xref:System.DateTime.Kind%2A> property of the returned <xref:System.DateTime> value always equals <xref:System.DateTimeKind.Unspecified?displayProperty=nameWithType>. You can preserve the <xref:System.DateTime.Kind%2A> property of the `time` parameter by calling the <xref:System.DateTime.SpecifyKind%2A?displayProperty=nameWithType> method, as the following example shows.
711711
@@ -861,7 +861,7 @@
861861
<format type="text/markdown"><![CDATA[
862862
863863
## Examples
864-
The following example uses reflection to instantiate each <xref:System.Globalization.Calendar> type found in the .NET Framework and displays the value of its <xref:System.Globalization.Calendar.AlgorithmType%2A> property.
864+
The following example uses reflection to instantiate each <xref:System.Globalization.Calendar> type found in .NET and displays the value of its <xref:System.Globalization.Calendar.AlgorithmType%2A> property.
865865
866866
[!code-csharp[System.Globalization.Calendar.AlgorithmType#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.globalization.calendar.algorithmtype/cs/algorithmtype1.cs#1)]
867867
[!code-vb[System.Globalization.Calendar.AlgorithmType#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.calendar.algorithmtype/vb/algorithmtype1.vb#1)]
@@ -1059,8 +1059,10 @@
10591059
10601060
[!INCLUDE[japanese-era-note](~/includes/calendar-era.md)]
10611061
1062+
The <xref:System.Globalization.JapaneseCalendar> and <xref:System.Globalization.JapaneseLunisolarCalendar> classes support multiple eras. Most calendar implementations, on the other hand, support a single era.
1063+
10621064
## Examples
1063-
The following code example displays the values contained in <xref:System.Globalization.JapaneseCalendar.Eras%2A?displayProperty=nameWithType>.
1065+
The following example displays the values contained in <xref:System.Globalization.JapaneseCalendar.Eras%2A?displayProperty=nameWithType> when the Heisei era (1989-2019) was the current era.
10641066
10651067
[!code-cpp[System.Globalization.JapaneseCalendar.Eras#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.JapaneseCalendar.Eras/CPP/yslin_japanesecalendar_eras.cpp#1)]
10661068
[!code-csharp[System.Globalization.JapaneseCalendar.Eras#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.JapaneseCalendar.Eras/CS/yslin_japanesecalendar_eras.cs#1)]
@@ -1607,8 +1609,8 @@
16071609
</Parameters>
16081610
<Docs>
16091611
<param name="time">The <see cref="T:System.DateTime" /> to read.</param>
1610-
<summary>When overridden in a derived class, returns the era in the specified <see cref="T:System.DateTime" />.</summary>
1611-
<returns>An integer that represents the era in <paramref name="time" />.</returns>
1612+
<summary>When overridden in a derived class, returns the era of the specified <see cref="T:System.DateTime" />.</summary>
1613+
<returns>An integer that represents the era of <paramref name="time" />.</returns>
16121614
<remarks>
16131615
<format type="text/markdown"><![CDATA[
16141616
## Remarks

0 commit comments

Comments
 (0)
0