Skip to content
This repository was archived by the owner on Apr 14, 2021. It is now read-only.

Leading zeroes in Date format #191

Closed
Delagen opened this issue Jun 17, 2016 · 4 comments
Closed

Leading zeroes in Date format #191

Delagen opened this issue Jun 17, 2016 · 4 comments

Comments

@Delagen
Copy link

Delagen commented Jun 17, 2016

No leading zeroes for format string dd.MM.yyyy in safari in latest build.
#152

@caridy
Copy link
Collaborator

caridy commented Jun 17, 2016

@Delagen can you provide more details? Maybe an example?

@Delagen
Copy link
Author

Delagen commented Jun 17, 2016

Date 2016-06-07 output as 7.6.2016

@caridy
Copy link
Collaborator

caridy commented Jun 17, 2016

@Delagen this is not a bug, the following is the output using polyfill and chrome (it is the same output):

new Intl.DateTimeFormat('en-GB', {
  day: 'numeric',
  month: 'numeric',
  year: 'numeric'
}).format(new Date(2016, 6, 7))
> "07/07/2016"

new Intl.DateTimeFormat('en', {
  day: 'numeric',
  month: 'numeric',
  year: 'numeric'
}).format(new Date(2016, 6, 7))
> "7/7/2016"

@caridy caridy closed this as completed Jun 17, 2016
@Delagen
Copy link
Author

Delagen commented Jun 20, 2016

Thanks. Does not know about such difference in locales

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants