code: def from_ordinal(cls, ordinal):
          
          if ordinal == 0:
              return ZeroDate
          if ordinal >= 736695:
              year = 2018     # Project release year
              month = 1
              day = int(ordinal - 736694)
          elif ordinal >= 719163:
              year = 1970     # Unix epoch
              month = 1
              day = int(ordinal - 719162)
          else:
              year = 1
              month = 1
              day = int(ordinal)
          if day < 1 or day > 3652059:
              # Note: this requires a maximum of 22 bits for storage
              # Could be transferred in 3 bytes.
              raise ValueError("Ordinal out of range (1..3652059)")
          if year < MIN_YEAR or year > MAX_YEAR:
              raise ValueError("Year out of range (%d..%d)" % (MIN_YEAR, MAX_YEAR))
          days_in_year = DAYS_IN_YEAR[year]
          while day > days_in_year:
              day -= days_in_year
              year += 1
              days_in_year = DAYS_IN_YEAR[year]
          days_in_month = DAYS_IN_MONTH[(year, month)]
          while day > days_in_month:
              day -= days_in_month
              month += 1
              days_in_month = DAYS_IN_MONTH[(year, month)]
          year, month, day = _normalize_day(year, month, day)
          return cls.__new(ordinal, year, month, day)
docs: Return the :class:`.Date` that corresponds to the proleptic
          Gregorian ordinal, where ``0001-01-01`` has ordinal 1 and
          ``9999-12-31`` has ordinal 3,652,059. Values outside of this
          range trigger a :exc:`ValueError`. The corresponding instance
          method for the reverse date-to-ordinal transformation is
          :meth:`.to_ordinal`.