Closed martin-css closed 7 years ago
Hey @martin-css
Thanks for reporting, I'm using the XML CLDR data downloaded from the CLDR site here and I know the CLDR data still isn't perfect.
It is very possible that I have made a parsing mistake as well though; I will check this out ASAP and keep you apprised of my progress.
If you could provide any or all locales you know the format is I correct, that would help :smile:
Even if the CLDR data is incorrect I am able to override anything needed during the generation phase, just need to know the details.
UPDATE: so when no data, in this case DateFormats for the gregorian calendar, exist in the XML as is the case for en_GB
I fallback to the base language/locale which would be en
and that has the MM/DD/YYYY
information.
Obviously this isn't 100% correct and I will endevor to find out the correct way to do this; in the meantime if there are any formats you need updating right away I am more than willing to add the exceptions.
UPDATE 2: I was already looking at converting this to use the JSON CLDR information, this issue is the perfect reason to implement it.
Will keep apprised.
Thanks for the updates. I had a look at the Unicode CLDR site, they have a page on the rules for English inheritance.
I think this is the underlying issue. en_GB
should be inheriting from en_001
instead of en
. This is why the JSON CLDR was correct but not the locale in this project.
Hopefully it should just be a case of updating the inheritance rules in the code generation to match this table.
Thanks @martin-css that's definitely the solution! 👍
I will add the English Inheritance cross reference to the code generation and that will solve the problem :smile:
I have a few interviews today, but will try to squeeze this in.
P.S. I will still probably eventually convert the code generation to use the new JSON rules, just so I can avoid issues like this in the future and avoid new issues as rules change.
Thanks.
Good luck with the interviews :+1:
Hey @martin-css this has been corrected in Release 0.11.1
thanks for all your help!
The
en_GB
locale has incorrect date formatting. The UK uses theDD/MM/YYYY
format as per most of Europe, not the US styleMM/DD/YYYY
format.I had a very quick look at the unicode CLDR but didn't see exactly where this was specified for individual dialects. I would be surprised if this was wrong as a US date format often causes complaints from users. I did find other auto generated data has the correct format, e.g. https://github.com/unicode-cldr/cldr-dates-full/blob/master/main/en-GB/ca-gregorian.json
Hence I was wondering if this was a code generation issue?