feat(es): support standalone months and ordinal dates - #657
Open
guerrerojuli wants to merge 1 commit into
Open
Conversation
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.
Summary
Adds a casual-only Spanish month-name parser modeled on the English implementation and integrates Spanish ordinal words through 31 into the existing day-first parser. Preserves numeric dates, ranges, suffixes, and original result text/index.
Behavior
septiembre,en septiembreseptiembre de 2027setiembre,en sepprimero de septiembretrigésimo primero de diciembreImplicit years use findYearClosestToRef and the common ForwardDateRefiner. Explicit aliases preserve accented and approved ASCII ordinal spellings. Existing numeric symbol suffixes remain supported alongside Spanish letter suffixes. The standalone parser yields to day-first grammar, including rejected invalid dates and compact ranges, to prevent partial month fallbacks.
No month-first parser, normalization, dependencies, generated output, public export changes, or unrelated Spanish grammar is included. This PR is independently based on master, not stacked on the future-expression changes.
Context
Related to #478 and #628. The month-parser structure and ordinal vocabulary adapt the overlapping work proposed by @juansegnana in #628. This smaller contribution adds direct standalone-month tests and wires the vocabulary into the existing little-endian parser without importing the broader configuration refactor or other parsers.
Verification