Dates for year 0 are broken in the ORM

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • None
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved:

                Version Package