Skip to content
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

YYYY should be yyyy and DD should be dd #520

Closed
tkrotoff opened this issue Jul 3, 2017 · 3 comments
Closed

YYYY should be yyyy and DD should be dd #520

tkrotoff opened this issue Jul 3, 2017 · 3 comments
Assignees
Milestone

Comments

@tkrotoff
Copy link

@tkrotoff tkrotoff commented Jul 3, 2017

The tokens accepted by date-fns are different with what most languages and libraries support.

I focus here on YYYY and DD.

Comparable:

  • AngularJS: yyyy dd instead of YYYY DD
  • Qt: yyyy dd instead of YYYY DD
  • C#: yyyy dd instead of YYYY DD
  • Java: yyyy dd instead of YYYY DD
  • Objective-C: yyyy dd instead of YYYY DD
  • Dart: yyyy dd instead of YYYY DD

They all follow the specifications from the Unicode Consortium CLDR: http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns

Not comparable:

Interpreted languages are mostly based on C function strftime() (so they are % based) since the interpreters are written in C. I guess strftime() predates the Unicode standard by several decades, that's why.

Edit: somewhat related to #351

@kossnocorp kossnocorp added this to the v2.0.0 milestone Oct 19, 2017
@leshakoss leshakoss self-assigned this Nov 16, 2017
leshakoss added a commit that referenced this issue Feb 3, 2018
@leshakoss

This comment has been minimized.

Copy link
Contributor

@leshakoss leshakoss commented Apr 24, 2018

Merged, going to be fixed with the next release

@mesqueeb

This comment has been minimized.

Copy link
Contributor

@mesqueeb mesqueeb commented Apr 25, 2018

@leshakoss Is this a breaking change? Should all localization files also be updated for this?

@leshakoss

This comment has been minimized.

Copy link
Contributor

@leshakoss leshakoss commented Apr 25, 2018

@mesqueeb yes it is and yes they should. I've updated the contribution guide some time ago. Here is the list of locales to be updated: https://github.com/date-fns/date-fns/blob/master/outdatedLocales.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.