Tim Bond created CB-13178:
-----------------------------
Summary: Single character y returned for year in getDatePattern
Key: CB-13178
URL: https://issues.apache.org/jira/browse/CB-13178
Project: Apache Cordova
Issue Type: Bug
Components: cordova-android, cordova-plugin-globalization
Environment: Android 7.1.2, Google Pixel
cordova-plugin-globalization version 1.0.7
Reporter: Tim Bond
Assignee: Joe Bowser
The following code:
{code:javascript}
navigator.globalization.dateToString(new Date(), (obj) => {
console.log(obj.value);
}, null, {
formatLength: 'medium',
selector: 'date'
});
{code}
Returns {{Aug 14, 2017}}.
The following code:
{code:javascript}
navigator.globalization.getDatePattern((obj) => {
console.log(obj.pattern);
}, null, {
formatLength: 'medium',
selector: 'date'
});
{code}
Returns {{MMM d, y}}.
According to the [UTR#35
spec|http://unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns] this
should return {{yyyy}} and not {{y}} for the year.
Locale is set to English (United States)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]