You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DatePipe does not Round 99.5 to 99.9 Milliseconds correctly #24384
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
The angular date pipe rounds the milisecond portion of the format without allowing a round upward from 99 to 100 to increase the the value in the second's position, producing both the wrong value and the wrong number of digits in the formatted output.
Although 0:03.100 is wrong, DatePipe should be used to display date, not time intervals and in my opinion it should not be rounded. For example, 2018-06-08T23:59:59.999 should not be rounded to 2018-06-09T00:00:00.00 in any circumstance.
Activity
dawidgarus commentedon Jun 8, 2018
Although 0:03.100 is wrong,
DatePipeshould be used to display date, not time intervals and in my opinion it should not be rounded. For example,2018-06-08T23:59:59.999should not be rounded to2018-06-09T00:00:00.00in any circumstance.jmgrill commentedon Jun 11, 2018
I agree with both comments above.
fix(common): do not round factional seconds
fix(common): do not round factional seconds (#24831)
docs: refactor pipe example to use the HttpClient (#22741)
angular-automatic-lock-bot commentedon Sep 13, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.