Support more flexible datetime format
matthuszagh opened this issue · 0 comments
matthuszagh commented
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.