code: def serialize(self):
          
          return {'syear': self.syear, 'smon': self.smon, 'smday': self.smday,
                  'swday': self.swday, 'swday_offset': self.swday_offset,
                  'eyear': self.eyear, 'emon': self.emon, 'emday': self.emday,
                  'ewday': self.ewday, 'ewday_offset': self.ewday_offset,
                  'skip_interval': self.skip_interval, 'other': self.other,
                  'timeranges': [t.serialize() for t in self.timeranges]}
docs: This function serialize into a simple dict object.
          It is used when transferring data to other daemons over the network (http)
  
          Here we directly return all attributes
  
          :return: json representation of a Daterange
          :rtype: dict