From d7166c11f8b43681523e99767b1a3d00921b1221 Mon Sep 17 00:00:00 2001 From: Matous Kozak Date: Tue, 23 Jul 2024 16:07:12 +0200 Subject: [PATCH 1/4] Update C# ja-JP and en-US DateTimeFormatInfo --- .../FullDateTimePattern/dtfi_fulldatetimepattern.cs | 4 ++-- .../LongDatePattern/dtfi_longdatepattern.cs | 2 +- .../MonthDayPattern/dtfi_monthdaypattern.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs index c0c016e7ba1..d476c1e2be0 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs @@ -26,8 +26,8 @@ public static void PrintPattern( String myCulture ) { This code produces the following output. The question marks take the place of native script characters. CULTURE PROPERTY VALUE - en-US dddd, MMMM dd, yyyy h:mm:ss tt - ja-JP yyyy'年'M'月'd'日' H:mm:ss + en-US dddd, MMMM d, yyyy h:mm:ss tt + ja-JP yyyy年M月d日dddd H:mm:ss fr-FR dddd d MMMM yyyy HH:mm:ss */ diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs index 527f5da9fc7..fb66607f602 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs @@ -27,7 +27,7 @@ public static void PrintPattern( String myCulture ) { CULTURE PROPERTY VALUE en-US dddd, MMMM d, yyyy - ja-JP yyyy'年'M'月'd'日' + ja-JP yyyy年M月d日dddd fr-FR dddd d MMMM yyyy */ diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs index 2d7e2359cb7..a073687096f 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs @@ -26,8 +26,8 @@ public static void PrintPattern( String myCulture ) { This code produces the following output. The question marks take the place of native script characters. CULTURE PROPERTY VALUE - en-US MMMM dd - ja-JP M'?'d'?' + en-US MMMM d + ja-JP M月d日 fr-FR d MMMM */ From 68b3a345a5583d5e9b0792333158483439a32e58 Mon Sep 17 00:00:00 2001 From: Matous Kozak Date: Wed, 24 Jul 2024 18:22:38 +0200 Subject: [PATCH 2/4] add/update Project.csproj files DTFI examples --- .../DateTimeFormatInfo/FullDateTimePattern/Project.csproj | 2 +- .../DateTimeFormatInfo/LongDatePattern/Project.csproj | 8 ++++++++ .../DateTimeFormatInfo/MonthDayPattern/Project.csproj | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/Project.csproj diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/Project.csproj b/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/Project.csproj index c02dc5044e7..5a1b02db677 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/Project.csproj +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net8.0 \ No newline at end of file diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/Project.csproj b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/Project.csproj new file mode 100644 index 00000000000..5a1b02db677 --- /dev/null +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/Project.csproj @@ -0,0 +1,8 @@ + + + + Library + net8.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/Project.csproj b/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/Project.csproj index c02dc5044e7..5a1b02db677 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/Project.csproj +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net8.0 \ No newline at end of file From 2ff3d3d8faa64d2840b06b33740189b28687ae25 Mon Sep 17 00:00:00 2001 From: Matous Kozak Date: Wed, 24 Jul 2024 18:23:12 +0200 Subject: [PATCH 3/4] Update DTFI comments --- .../FullDateTimePattern/dtfi_fulldatetimepattern.cs | 2 +- .../DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs | 2 +- .../DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs index d476c1e2be0..3fc918c038d 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/FullDateTimePattern/dtfi_fulldatetimepattern.cs @@ -23,7 +23,7 @@ public static void PrintPattern( String myCulture ) { } /* -This code produces the following output. The question marks take the place of native script characters. +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. CULTURE PROPERTY VALUE en-US dddd, MMMM d, yyyy h:mm:ss tt diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs index fb66607f602..0215a38e54c 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/dtfi_longdatepattern.cs @@ -23,7 +23,7 @@ public static void PrintPattern( String myCulture ) { } /* -This code produces the following output: +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. CULTURE PROPERTY VALUE en-US dddd, MMMM d, yyyy diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs index a073687096f..3e326622f64 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/MonthDayPattern/dtfi_monthdaypattern.cs @@ -23,7 +23,7 @@ public static void PrintPattern( String myCulture ) { } /* -This code produces the following output. The question marks take the place of native script characters. +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. CULTURE PROPERTY VALUE en-US MMMM d From 8cfbd6631040d442ddb08b72f916efa857c7f06f Mon Sep 17 00:00:00 2001 From: Matous Kozak Date: Wed, 24 Jul 2024 19:12:06 +0200 Subject: [PATCH 4/4] Rename longdatepattern example classes --- .../DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs | 2 +- .../DateTimeFormatInfo/LongDatePattern/longdatepattern2.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs index 39e7f425ac8..fcf06f605c2 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern1.cs @@ -2,7 +2,7 @@ using System; using System.Globalization; -public class Example +public class Example1 { public static void Main() { diff --git a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern2.cs b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern2.cs index c2431629516..43d10ce6a85 100644 --- a/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern2.cs +++ b/snippets/csharp/System.Globalization/DateTimeFormatInfo/LongDatePattern/longdatepattern2.cs @@ -3,7 +3,7 @@ using System.Globalization; using System.IO; -public class Example +public class Example2 { public static void Main() {