parameters: (self, year, century_specified=False)
return_statement: return year
docstring: Converts two-digit years to year within [-50, 49]
          range of self._year (current local time)
docstring_summary: Converts two-digit years to year within [-50, 49]
          range of self._year (current local time)
docstring_tokens: Converts two - digit years to year within [ - 50 49 ] range of self . _year ( current local time )
function: def convertyear(self, year, century_specified=False):
          """
          Converts two-digit years to year within [-50, 49]
          range of self._year (current local time)
          """
  
          # Function contract is that the year is always positive
          assert year >= 0
  
          if year < 100 and not century_specified:
              # assume current century to start
              year += self._century
  
              if year >= self._year + 50:  # if too far in future
                  year -= 100
              elif year < self._year - 50:  # if too far in past
                  year += 100
  
          return year
function_tokens: def convertyear ( self , year , century_specified = False ) : # Function contract is that the year is always positive assert year >= 0 if year < 100 and not century_specified : # assume current century to start year += self . _century if year >= self . _year + 50 : # if too far in future year -= 100 elif year < self . _year - 50 : # if too far in past year += 100 return year