Skip to content

Timespan format makes some cited entity publication dates ambiguousΒ #9

@CharnelMouse

Description

@CharnelMouse

This is based on looking at DOCI data, but looking at COCI's software review and code leads me to believe that COCI would have a similar issue.

Applying a timeutils.relativedelta to a date is not invertible, because calculation of the relative delta involved clamping the day to current month after year/month differences, and before day differences. For example, applying a difference of one month (P0Y1M) to any date between 2023-01-28 and 2023-01-31 gives 2023-02-28. This happens whenever the starting date occurs on the last day of its month, and the ending date's month has more days.

This means that only providing the cited publication date and the timespan does not all the information regarding the citation, since deriving the cited publication date from the citing publication date and the timespan is not always possible. For the above example, given a citing publication date of 2023-02-28 and a timespan of P0Y1M, we could only say the cited publication date is between 2023-01-28 and 2023-01-31.

This could be fixed by including the cited publication date, or by using an invertible timespan format, such as difference in days.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions