Repository navigation
Fix default fallbacks to "en" everywhere - #98
Merged
Merged
Conversation
Everything now falls back to 'en' which is functionally the same as 'en-US'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without a locale, every function now uses the built-in
enlocale.Before, the defaults disagreed.
parseValueuseden-US, whileparseDate,parseNumber,parseTime, andparseBooldid not.format()used hard-coded patterns for the system date and time codes.defaultLocaleis now the built-inenlocale, so unknown locale tags also fall back toen.getLocale()acceptsundefinedand an empty string, and returnsundefinedfor them.delocalize()falls back toenfor an unknown locale.A side effect to this that I had to fix is that:
A/PprintsAorPin every localeA/Pprinted a single letter only when no locale was given. With any locale, includingen-US, it printed the locale's full AM/PM names. It now always printsAorP, as Excel does.A driveby fix: Regexp matcher for TOKEN_MODIFIER was incorrect. This doesn't affect much since formats that this happens in would have yielded errors anyway.
Fixes #97