code: def _format(self, format):
          
  
          format = format.replace('%Y', '0000')
          # Year 0 is 1BC and a leap year. Leap years repeat themselves
          # every 28 years. Because of adjustments and the proleptic gregorian
          # calendar, the simplest way to format is to substitute year 2000.
          temp = datetime(
              2000,
              self.month,
              self.day,
              self.hour,
              self.minute,
              self.second,
              self.microsecond,
              self.tzinfo
          )
          if '%c' in format:
              c_out = temp.strftime('%c')
              # Handle full years
              c_out = c_out.replace('2000', '0000')
              c_out = c_out.replace('%', '%%')
              format = format.replace('%c', c_out)
          if '%x' in format:
              x_out = temp.strftime('%x')
              # Handle formats such as 08/16/2000 or 16.08.2000
              x_out = x_out.replace('2000', '0000')
              x_out = x_out.replace('%', '%%')
              format = format.replace('%x', x_out)
          return temp.strftime(format)
docs: Performs strftime(), always returning a unicode string
  
          :param format:
              A strftime() format string
  
          :return:
              A unicode string of the formatted datetime