.isValidDate()

Method checks that the given string is a valid date.

Description of the method

 

Description: isValidDate method checks that the given string is a valid date. It takes the expected date format as a parameter. Date format is defined with Java SimpleDateFormat syntax (http://docs.oracle.com/javase/7/docs...ateFormat.html)
Available for: string
Parameters: -
Return type: boolean

Example

 

Context: HeaderType1
OCL: self.dateTimeString.isValidDate("yyyy-MM-dd'T'HH:mm:ss.SSSXXX")
Description: The example rule checks that the value in dateString field is valid ISO 8601 datetime.