Repository navigation
Date and time formats: JDATE, QYR, MOYR and WKYR in DATA LIST and ALTER TYPE, no-delimiter forms, minute and second limits; every format against R - #455
Merged
Conversation
…ER TYPE, dates and times with no delimiters, minute and second limits; every format against R
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.
R audit of the date and time formats of the guide, written and read (414 written values, 144 read values). Writing agrees at every width tested (DATE, ADATE, EDATE, SDATE, JDATE, QYR, MOYR, WKYR, DATETIME, YMDHMS, TIME, MTIME, DTIME, WKDAY, MONTH). Reading had gaps, closed by one new reader (engine/src/date_input.rs) from the guide's table of formats: DATA LIST and ALTER TYPE could not read JDATE, QYR, MOYR and WKYR; no format took a date or time without delimiters (28OCT1990, 10281990, 0530, 20110317140645); a plus sign on a time was refused; DATETIME refused 17/3/2011 and a spelled-out month; minutes and seconds of 60 or more with an hour were accepted. ALTER TYPE from a string now also takes DATETIME, YMDHMS, TIME and MTIME. Kept from the old reader: an uppercase T between date and time also in DATETIME (never the T of a month name), a bare MTIME number that is not four digits is minutes. One change in behaviour, stated in the CHANGELOG: a bare four-digit MTIME value is now mmss (0719 is 7:19). Choices where the guide is silent are in planning section 8. Whole engine and syntax suites, clippy, overlap check pass. Review: medium, two rounds on the worktree; round one found real regressions of the old reader (the T separator in DATETIME, the T of a month name, bare MTIME minutes, the order of a fraction check), all fixed and pinned by new test rows; round two: a fraction on hhmm dropped silently (fixed), the four-digit MTIME change (decided and documented), the DATETIME no-delimiter wording (narrowed).