Skip to main content
2 of 3
deleted 62 characters in body
Xcali
  • 16.2k
  • 2
  • 15
  • 39

Perl 5 -p, 27 22 bytes

$_=!/[6-9].(?=(..)*$)/

Try it online!

Since the input is guaranteed to be less than 236000, the hours can be ignored as they will always be valid. This pattern match checks if there is a 6, 7, 8, or 9 in the tens digit of the minutes or seconds. The match is then negated to get truthy for valid dates and falsy for invalid ones.

Xcali
  • 16.2k
  • 2
  • 15
  • 39