def set_lastUpdate(self, date): """! @brief Set global information last update. @param date The date to set. @return GlobalInformation instance. """ check_date_format(date) self.lastUpdate = date return self
def set_creationDate(self, date): """! @brief Set global information creation date. @param date The date to set. @return GlobalInformation instance. """ check_date_format(date) self.creationDate = date return self
def test_check_date_format(self): # Test error cases dates = ["2014", "YYYY-MM-DD", "2014-10-8", "08-10-2014", "2014/10/08"] for date in dates: check_date_format(date)