Skip to content

is_date implementation seems out of date #462

@caramdache

Description

@caramdache

I've been having issues with certain cell values being recognised as dates because of the cell format was set as a custom date format, but the cell content wasn't really a date and was not supposed to be consummed as a date.

For example, the string '1-23, stored as the sring 133, was being considered as the date 23/09/2024, with created a number of issues for downstream processing, whereas it should have been considered as the range [1, 23], expressed as a string.

While investigating this issue, I've come across this nice writeup, which indicates that this is what used to happen in "compatibility" mode, during the transition from .xlx to .xlsx, but that in modern, newly created .xlsx files, the behaviour should be different. And that the cell should only be considered a date cell, if the cell is of type date ("d"), irrespectively of whether the format is a date format.

http://www.ericwhite.com/blog/dates-in-strict-spreadsheetml-files/

By looking at the current implementation of the is_date method, it looks like it is implementing the "compatibility" mode and not the "strict", modern mode. It would be great if the code could be updated to support the "strict" mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions