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

German standard Date format #661

Closed
DamirUtje opened this issue Dec 20, 2016 · 4 comments
Closed

German standard Date format #661

DamirUtje opened this issue Dec 20, 2016 · 4 comments

Comments

@DamirUtje
Copy link

I'm using the cldr version 30.0.2 lib. and the German standard Date format seems to be wrong 👎

standard format should be => "dd.MM.yyyy"

ca-generic.json & ca-gregorian.json => "dd.MM.yy"

see:
"dateFormats": {
"full": "EEEE, d. MMMM y G",
"long": "d. MMMM y G",
"medium": "dd.MM.y G",
"short": "dd.MM.yy GGGGG"
}

What is the reason for this issue and is it possible for u to change this in the next version ?

Thanks
Damir

@rxaviers
Copy link
Member

Hi @DamirUtje thanks for bringing this up, although I didn't understand what standard date you're referring to. The default pattern for formatDate is {skeleton: 'yMd'}, which corresponds to 'd.M.y' in German.

The {date: "short"} corresponds to the 'dd.MM.yy' pattern you mention. If you believe CLDR data should be fixed, there's http://unicode.org/cldr/trac/search. I recommend making a search there first to check if someone has reported the same issue you observe. By the way, why do you believe this should be "dd.MM.yyyy"?

@DamirUtje
Copy link
Author

Hello @rxaviers , thanks for your reply. I will follow your advise.

The reason why my pc operation systems (windows, linux) use this pattern "dd.MM.yyyy" to show current date in the task bar:

"The format dd.mm.yyyy [..] is the traditional German date format. [..] Since 2006, the old format (d)d.(m)m.(yy)yy is allowed again as alternative to the yyyy-mm-dd format .."

Look here:
https://en.wikipedia.org/wiki/Date_format_by_country

Thanks
Damir

@rxaviers
Copy link
Member

rxaviers commented Jan 6, 2017

@DamirUtje, be advised that you can use Globalize as follows (to format a date using 'dd.mm.yyyy' in German):

Globalize('de').formatDate(new Date(), {skeleton: 'yMMdd'})
'06.01.2017'

Important: this same skeleton might not work on some other locales until #271 is implemented though.

If you need any help in your request to CLDR, let me know. Having said that, it's still confusing to me what's your proposal, i.e., which of these patterns do you want them to change.

@rxaviers rxaviers closed this as completed Jan 6, 2017
@DamirUtje
Copy link
Author

@rxaviers skeleton: 'yMMdd' doesn't work for me .. when i change the browser default language from german to "en-GB" or "en" , my webApp crashes .. I am using a localized DevExpress widget, so i need more than only the german formatting

If i use skeleton: 'yMd' the result is "d.M.yyyy" instead of "dd.MM.yyyy" ..

It seems that there is a misunderstanding relating to standardized date format and i hope that this issue can be fixed in the next version.

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

No branches or pull requests

2 participants