Repository navigation
Use TRUNCATE_TO_YEAR in the FRBP 9037 example - #47
Merged
Merged
Conversation
TRUNCATE keeps leading characters rather than reducing a date to its year. Also correct the TRUNCATE catalog description, which suggested otherwise, and note that the example is broader than the rule.
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.
The FRBP 9037 example says "dates to year only" but compiled dates to
TRUNCATE.TRUNCATEkeeps a set number of characters at one end of the value and replaces the rest; reducing a date to its year isTRUNCATE_TO_YEAR.04-frbp-9037.phisqland04-frbp-9037.jsonnow useTRUNCATE_TO_YEAR.TRUNCATEdescription incatalog/strategies.yamlsaid "e.g., dates to year only", which is likely where the example's mistake came from. It now describes whatTRUNCATEdoes and points toTRUNCATE_TO_YEAR. The description is informative only, so what a compiler accepts is unchanged.No grammar, schema, or compile-contract change, so no RFC is needed (CONTRIBUTING: a bug fix where the implementation diverged from the spec).
Verified locally:
scripts/validate_spec.pypasses,pytest scripts/testspasses (7), the Python reference compiler's tests pass (326, includingtest_examples_complete, which compiles each example and compares it to its JSON), and the Java reference buildmvn verifypasses.🤖 Generated with Claude Code