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

Dates for year 0 are broken in the ORM

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Site Backend
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package