Uploaded image for project: 'BookBrainz'
  1. BookBrainz
  2. BB-434

Dates for year 0 are broken in the ORM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • Site Backend

      A date parsing utility function in the ORM (https://github.com/bookbrainz/bookbrainz-data-js) considers that if year is 0 it should return a null date instead.
      Here's the culprit:
      https://github.com/bookbrainz/bookbrainz-data-js/blob/1d36915dcd5b895c6860048d8051a79784618967/src/util.js#L178-L180

      If year=0, `!year` will equal true, and return `null`

      This should be changed to allow for year=0 somehow.

            Chinmay Chinmay Kothari
            mr_monkey Monkey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package