예제 #1
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     if data == None:
         self.date = Date()
     else:
         self.date = Date().unserialize(data)
예제 #2
0
 def __init__(self, source=None):
     """
     Create a new DateBase, copying from source if not None
     
     @param source: Object used to initialize the new object
     @type source: DateBase
     """
     if source:
         self.date = Date(source.date)
     else:
         self.date = Date()
예제 #3
0
    def get_date_object(self):
        """
        Returns the L{Date} object associated with the DateBase.

        @return: Returns a DateBase L{Date} instance.
        @rtype: L{Date}
        """
        if not self.date:
            self.date = Date()
        return self.date