Skip to content

Support more flexible datetime format #1

Description

@matthuszagh

The current

      "date": {
        "year": null,
        "month": null,
        "day": null
      },

is awkward. A better solution would have date as an ISO8601 string that gets parsed into a date structure. ISO8601 is needed over RFC3339 because ISO8601 supports dates such as "2021", instead of requiring full date strings, which is useful for e.g., publications which only specify a year date. One possible solution is https://github.com/chronotope/chrono. Unfortunately, it fails to support a lot of valid IS8601 formats and generally requires fully-specified datetimes (see chronotope/chrono#587). Hopefully this will change in the future. If not, I'll probably have to add my own serializer and deserializer.

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