Skip to content

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
TonisOrmisson merged 1 commit into
mainfrom
dm-dates
Nov 26, 2026
Merged

TonisOrmisson merged 1 commit into
mainfrom
dm-dates

Conversation

@TonisOrmisson

Copy link
Copy Markdown
Contributor

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).

…ER TYPE, dates and times with no delimiters, minute and second limits; every format against R
@TonisOrmisson
TonisOrmisson merged commit 6848942 into main Nov 26, 2026
3 checks passed
@TonisOrmisson
TonisOrmisson deleted the dm-dates branch November 26, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant