Exemplo n.º 1
0
    def set_end_date(self,end_date):

        """ validates and set end_date """

        if end_date and self.validate:
            if validations.is_valid_date(self, end_date):
                self.end_date = end_date
            else:
                raise ValueError("Invalid End Date Value")
        else:
            self.end_date = end_date
Exemplo n.º 2
0
    def set_start_date(self,start_date):

        """ validates and set start_date """

        if start_date and self.validate:
            if validations.is_valid_date(self, start_date):
                self.start_date = start_date
            else:
                raise ValueError("Invalid Start Date Value")
        else:
            self.start_date = start_date