musicbrainz_rs icon indicating copy to clipboard operation
musicbrainz_rs copied to clipboard

Support release with incomplete date

Open CrendKing opened this issue 1 year ago • 0 comments

For instance, release 2e6374f8-420b-353b-8c42-dbb249bfac1c's date is simply "1984" without the month and day. When retrieved with this crate, it is converted to a NaiveDate with value "1984-01-01", supposedly due to this logic. Doesn't seem to have a way to restore the original "1984" value.

Sure, we can heuristically say if the date's month and day are both 1, most likely they can be discarded. But there could be case where the release date is really on the new year's day.

Maybe instead of deserialize the date to a NaiveDate, simply keep it as String, and let user choose which library to use?

CrendKing avatar Sep 29 '22 07:09 CrendKing