diff options
author | Eric Erhardt <eric.erhardt@microsoft.com> | 2015-11-13 16:01:06 -0600 |
---|---|---|
committer | Eric Erhardt <eric.erhardt@microsoft.com> | 2015-11-13 16:01:06 -0600 |
commit | aaaa61252af283c16efd183f15a040c6ba27d5a7 (patch) | |
tree | 6421a94ef102565d42d1f8361f2199e29d834c63 /src/corefx | |
parent | 29526273e376bdf647102388260907b70778f9df (diff) | |
download | coreclr-aaaa61252af283c16efd183f15a040c6ba27d5a7.tar.gz coreclr-aaaa61252af283c16efd183f15a040c6ba27d5a7.tar.bz2 coreclr-aaaa61252af283c16efd183f15a040c6ba27d5a7.zip |
DateTimeFormat.ShortDatePattern should use CLDR 'short' format on Unix.
The DateTimeFormat.ShortDatePattern is currently defaulting to using CLDR's 'yMd' skeleton. However, this value doesn't produce the best format for all cultures, ex. "de-DE". LongDatePattern uses CLDR's 'full' format. To be symmetrical, the ShortDatePattern should be using CLDR's 'short' format.
Fix https://github.com/dotnet/coreclr/issues/1736.
Diffstat (limited to 'src/corefx')
-rw-r--r-- | src/corefx/System.Globalization.Native/calendarData.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/corefx/System.Globalization.Native/calendarData.cpp b/src/corefx/System.Globalization.Native/calendarData.cpp index c18bc9de8e..f223e6836d 100644 --- a/src/corefx/System.Globalization.Native/calendarData.cpp +++ b/src/corefx/System.Globalization.Native/calendarData.cpp @@ -556,11 +556,10 @@ extern "C" int32_t EnumCalendarInfo(EnumCalendarInfoCallback callback, { case ShortDates: // ShortDates to map kShort and kMedium in ICU, but also adding the "yMd" - // skeleton as well, as this - // closely matches what is used on Windows - return InvokeCallbackForDateTimePattern(locale, UDAT_YEAR_NUM_MONTH_DAY_UCHAR, callback, context) && - InvokeCallbackForDatePattern(locale, UDAT_SHORT, callback, context) && - InvokeCallbackForDatePattern(locale, UDAT_MEDIUM, callback, context); + // skeleton as well, as this closely matches what is used on Windows + return InvokeCallbackForDatePattern(locale, UDAT_SHORT, callback, context) && + InvokeCallbackForDatePattern(locale, UDAT_MEDIUM, callback, context) && + InvokeCallbackForDateTimePattern(locale, UDAT_YEAR_NUM_MONTH_DAY_UCHAR, callback, context); case LongDates: // LongDates map to kFull and kLong in ICU. return InvokeCallbackForDatePattern(locale, UDAT_FULL, callback, context) && |