Hello,
I want to parse a time string in a given locale. Here is some test code:
console.log("Parsing time value [10:30 AM] with locale "+dojo.locale);
result = dojo.date.locale.parse("10:30 AM", { selector : "time" });
console.log("Result: ["+result+"]");
console.log("Parsing time value [10:30:11 AM] with locale "+dojo.locale);
result = dojo.date.locale.parse("10:30:11 AM", { selector : "time" });
console.log("Result: ["+result+"]");
And here are the results in the console:
Parsing time value [10:30 AM] with locale en-US
Result: [Thu Jan 01 1970 10:30:00 GMT+0100 (Central European Standard Time)
Parsing time value [10:30:11 AM] with locale en-US
Result: [null]
It shows that the locale is ‘en-US’ and that it can parse hours + minutes but not the time string with the seconds added. Can someone please help me here? Do I something wrong or is this a bug?
I’m using dojo 1.10.10, Firefox 75.0, Windows 10.