Skip to content

Add support for european dates in header files. - #550

Closed
Ivorforce wants to merge 1 commit into
MIT-LCP:mainfrom
Ivorforce:euro-date-format
Closed

Ivorforce wants to merge 1 commit into
MIT-LCP:mainfrom
Ivorforce:euro-date-format

Conversation

@Ivorforce

@Ivorforce Ivorforce commented Nov 25, 2025 •

Copy link
Copy Markdown
Contributor

Modeled after wfdb_strptime (directly above).

I'm not sure if this is violating the spec, but it should be fairly unambiguous with this date format (moreso than the d/m/y format, which might be interpreted as m/d/y).

@Ivorforce

Copy link
Copy Markdown
Contributor Author

Just noticing that this change wouldn't work just yet because of the regex above. I'll wait for feedback before fixing that though.

@tompollard

Copy link
Copy Markdown
Member

Thanks for this! The WFDB header format only allows the base date as DD/MM/YYYY, and the WFDB library ignores a date in any other form (rdsamp -pd shows no date for a header with 25.04.1989), so accepting DD.MM.YYYY here would make the two read the same file differently. Closing for that reason.

Perhaps we should consider supporting ISO 8601 dates (YYYY-MM-DD) in future. That would need changes to the WFDB library and the format specification too, though, so it's not something we'd add here on its own. Please feel free to open an issue if you'd like to discuss this further.

@tompollard

Copy link
Copy Markdown
Member

For anyone following this: there is now a draft proposal for a JSON header syntax, which uses ISO 8601 dates (YYYY-MM-DD), in wfdb/wfdb-spec#25. Comments are welcome there.

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.

2 participants