-
-
Notifications
You must be signed in to change notification settings - Fork 8
Date pipe with 'medium' format adds/truncates zero from single-digit hours and seconds #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@otaran thank you for reporting this one! After creating this test application I can confirm that indeed using Date pipe with format medium or mediumTime is not rendering the expected result. example:
where now is the same as in the above example
|
@otaran indeed this appears to be a limitation coming from nativescript-intl plugin. Currently, you can use all other Date pipes apart from medium and mediumTime where the issue with the seconds appears. |
From @otaran on May 23, 2017 14:16 @NickIliev thanks for verifying this! Should I report this issue to nativescript-intl project? |
@NickIliev just FYI this issue is reproducible on both Android and iOS. |
From @otaran on May 22, 2017 19:39
Steps to reproduce
hours < 10
andseconds < 10
.date
pipe andmedium
format:Expected result
The date doesn't have leading zero in hours, has leading zero in seconds and has a comma after year:
May 22, 2017, 7:05:09 AM
(in UTC timezone).Actual result
The date has leading zero in hours, doesn't have leading zero in seconds and doesn't have a comma after year:
May 22, 2017 07:05:9 AM
(in UTC timezone).Notes
Plunker to demonstrate expected Angular behavior: https://embed.plnkr.co/eF8VFN/
Nativescript app to demonstrate actual behavior: tns-date-pipe.zip
Copied from original issue: NativeScript/nativescript-angular#815
The text was updated successfully, but these errors were encountered: