Hello kendoUI Team,
I am 98% sure the following is a bug: https://dojo.telerik.com/UZuKImUs/2
In this Dojo link, the AM/PM designators are logged to the console for the cultures en-US and de-DE. They appear to be empty for de-DE. Consequently, a custom format string "yyyy.MM.dd hh:mm:ss tt" will result in a formatted Date without the AM/PM designator at the end for the de-DE culture, instead ending with a trailing whitespace (i.e. the whitespace between "ss" and "tt" in the format string).
The JS console output for this Dojo code is:
AM designator(s) for en-US culture: AM, am, AM
PM designator(s) for en-US culture: PM, pm, PM
Format "yyyy.MM.dd hh:mm:ss tt" for en-US culture: "2011.01.01 12:27:36 PM"
AM designator(s) for de-DE culture:
PM designator(s) for de-DE culture:
Format "yyyy.MM.dd hh:mm:ss tt" for de-DE culture: "2011.01.01 12:27:36 "
Contrast this with the following equivalent .NET snippet:
using System.Globalization;
var testDate = new DateTime(2011, 1, 1, 12, 27, 36, 952);
var dateTimeTestFormat = "yyyy.MM.dd hh:mm:ss tt";
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Console.WriteLine($"AM designator(s) for en-US culture: {Thread.CurrentThread.CurrentCulture.DateTimeFormat.AMDesignator}");
Console.WriteLine($"PM designator(s) for en-US culture: {Thread.CurrentThread.CurrentCulture.DateTimeFormat.AMDesignator}");
Console.WriteLine($"Format \"{dateTimeTestFormat}\" for en-US culture: {testDate.ToString(dateTimeTestFormat)}");
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
Console.WriteLine($"AM designator(s) for de-DE culture: {Thread.CurrentThread.CurrentCulture.DateTimeFormat.AMDesignator}");
Console.WriteLine($"PM designator(s) for de-DE culture: {Thread.CurrentThread.CurrentCulture.DateTimeFormat.AMDesignator}");
Console.WriteLine($"Format \"{dateTimeTestFormat}\" for de-DE culture: {testDate.ToString(dateTimeTestFormat)}");
The output of this C# code is:
AM designator(s) for en-US culture: AM
PM designator(s) for en-US culture: AM
Format "yyyy.MM.dd hh:mm:ss tt" for en-US culture: 2011.01.01 12:27:36 PM
AM designator(s) for de-DE culture: AM
PM designator(s) for de-DE culture: AM
Format "yyyy.MM.dd hh:mm:ss tt" for de-DE culture: 2011.01.01 12:27:36 PM
While I am aware that kendo.culture cannot be a carbon copy of .NET's CultureInfo, I'm pretty sure that the missing AM/PM designators for the "de-DE" culture (possibly for others as well!) are an oversight in this particular case.