isDate method

bool isDate()

Return whether input matches regex of date which pattern is 'yyyy-MM-dd'.

Implementation

bool isDate() {
  return matches(regexDate);
}