[pull] master from moment:master - #104
Merged
Merged
Conversation
… table (#1789) The parsing token table listed the format tokens (E, M) under the Standalone token column and the standalone tokens (c, L) under the Format token column -- the reverse of docs/formatting.md and of Luxon's API, where c/L are standalone and E/M are format. Swap the two columns for all affected weekday and month rows so the parsing table is correct and consistent with the formatting docs. Closes #1777
… offset (#1781) FixedOffsetZone#isValid always returned true, even when the constructor was given an input it does not support (e.g. new FixedOffsetZone('CDT')). Such a zone produced a NaN offset and a 'UTC-NaN' name, yet reported itself as valid, so DateTimes using it failed downstream with a confusing 'invalid input' reason instead of being cleanly invalid. isValid now reflects whether the offset is a number, so unsupported inputs produce an invalid zone (and, in turn, an 'unsupported zone' DateTime), matching the behaviour of IANAZone. Closes #1068
The rfc2822 regex already matches UT in its zone alternation (UT|GMT|[ECMP][SD]T), but UT was missing from the obsOffsets lookup table, so obsOffsets["UT"] was undefined and the parse failed with an "unsupported zone" error. RFC 2822 / 5322 section 4.3 lists UT alongside GMT as an obsolete zone meaning +0000, so it should parse the same as GMT. Add UT: 0 to the table.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )