:earth_americas: a set of locales generated from the CLDR Project which can be used independently or within an i18n package; these were built for use with, but not exclusive to https://github.com/go-playground/universal-translator
MIT License
268
stars
55
forks
source link
Reformat en locale time formatting to fix issue for 12:00 AM formatting #44
This issue addresses a bug which was raised in #41 . Please see the issue comments for further understanding of the conversation around this issue.
TLDR:
According to the CLDR specification the 'en' locale should be formatting the value for 12:00 AM as 12:00 AM and not 00:00 AM
Changes:
FmtTimeShort, FmtTimeMedium, FmtTimeLong and FmtTimeFull now displaying 12 for representing the hour 12:00 AM
Unit tests added for each of the functions to cover this case.
Excluded:
In addition to this, I discovered the same issue exists for a large number of the en locales, any locale which should be formatting hours as the patter h as defined by the CLDR spec. I excluded these, due to a large number of unit tests being commented out for those locales. Given I am not aware of the context as to why they are commented out, I didn't want to touch those.
I have created a follow up issue to address this: #45
Description:
This issue addresses a bug which was raised in #41 . Please see the issue comments for further understanding of the conversation around this issue.
TLDR: According to the CLDR specification the 'en' locale should be formatting the value for 12:00 AM as
12:00 AM
and not00:00 AM
Changes:
Excluded:
In addition to this, I discovered the same issue exists for a large number of the en locales, any locale which should be formatting hours as the patter
h
as defined by the CLDR spec. I excluded these, due to a large number of unit tests being commented out for those locales. Given I am not aware of the context as to why they are commented out, I didn't want to touch those.I have created a follow up issue to address this: #45
fixes #41