Skip to content

DatePipe doesn't support local Dates in Safari #17576

@christarczon

Description

@christarczon

I'm submitting a ...


[ ] Regression (behavior that used to work and stopped working in a new release)
[x] Bug report 
[ ] 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

There are lots of issues floating around with internationalization and the DatePipe itself but I couldn't find mention of this. Safari 10 isn't supposed to need it but I tried the Intl polyfill and it doesn't seem to affect anything.

Current behavior

DatePipe formats days off by one, different depending on timezone. Testing by changing my OS timezone, I see that far west timezones like Pacific are fine, eastern hemisphere zones break every date, my Central daylight zone has issues with certain dates.

Expected behavior

Formatted date should match input.

Minimal reproduction of the problem with instructions

https://plnkr.co/edit/Lso5JZgR34UQhlDN35he?p=preview

What is the motivation / use case for changing the behavior?

Browser consistency

Please tell us about your environment


Angular version: 4.2.3

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [x] Safari (desktop) version 10.1.1 and Tech Preview
- [x] Safari (iOS) version 10.3.2
- [ ] IE version XX
- [ ] Edge version XX

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: i18nIssues related to localization and internationalization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions