Skip to content

Commit 7384cbe

Browse files
authored
Update C# examples for ja-JP and en-US DateTimeFormatInfo (#10141)
1 parent 3f70f78 commit 7384cbe

File tree

8 files changed

+20
-12
lines changed

8 files changed

+20
-12
lines changed

snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/Project.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Library</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
</Project>

snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ public static void PrintPattern( String myCulture ) {
2323
}
2424

2525
/*
26-
This code produces the following output. The question marks take the place of native script characters.
26+
This code produces the following output. Note that the exact output format depends on the OS, the OS version, and the native globalization library used by the OS.
2727
2828
CULTURE PROPERTY VALUE
29-
en-US dddd, MMMM dd, yyyy h:mm:ss tt
30-
ja-JP yyyy'年'M'月'd'日' H:mm:ss
29+
en-US dddd, MMMM d, yyyy h:mm:ss tt
30+
ja-JP yyyy年M月d日dddd H:mm:ss
3131
fr-FR dddd d MMMM yyyy HH:mm:ss
3232
3333
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Library</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
</Project>

snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ public static void PrintPattern( String myCulture ) {
2323
}
2424

2525
/*
26-
This code produces the following output:
26+
This code produces the following output. Note that the exact output format depends on the OS, the OS version, and the native globalization library used by the OS.
2727
2828
CULTURE PROPERTY VALUE
2929
en-US dddd, MMMM d, yyyy
30-
ja-JP yyyy'年'M'月'd'日'
30+
ja-JP yyyy年M月d日dddd
3131
fr-FR dddd d MMMM yyyy
3232
3333
*/

snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System;
33
using System.Globalization;
44

5-
public class Example
5+
public class Example1
66
{
77
public static void Main()
88
{

snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Globalization;
44
using System.IO;
55

6-
public class Example
6+
public class Example2
77
{
88
public static void Main()
99
{

snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/Project.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Library</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
</Project>

snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ public static void PrintPattern( String myCulture ) {
2323
}
2424

2525
/*
26-
This code produces the following output. The question marks take the place of native script characters.
26+
This code produces the following output. Note that the exact output format depends on the OS, the OS version, and the native globalization library used by the OS.
2727
2828
CULTURE PROPERTY VALUE
29-
en-US MMMM dd
30-
ja-JP M'?'d'?'
29+
en-US MMMM d
30+
ja-JP M月d日
3131
fr-FR d MMMM
3232
3333
*/

0 commit comments

Comments
 (0)