format('Y-m-d') !== $date) { throw new InvalidArgumentException("Invalid employment end date [{$date}], expected Y-m-d."); } return $parsed; } }