globalizejs / globalize

A JavaScript library for internationalization and localization that leverages the official Unicode CLDR JSON data
https://globalizejs.com
MIT License
4.8k stars 605 forks source link

Fix dayPeriod and timeZoneName in documentation #899

Closed dantman closed 4 years ago

dantman commented 4 years ago

Globalize actually returns lower case dayperiod. But the documentation says dayPeriod.

This is confusing because Intl.DateTimeFormat's formatToParts does return dayPeriod but Globalize diverges from this and returns lower case dayperiod. This mistake in the documentation can lead to tricky bugs where a developer writes code according to the documentation checking for dayPeriod which doesn't work.

jsf-clabot commented 4 years ago

CLA assistant check
All committers have signed the CLA.

dantman commented 4 years ago

Additionally Globalize actually returns a zone part with zone info, not a timeZoneName part.

rxaviers commented 4 years ago

Thank you