I\'m receiving a date string from an API, and it is formatted as yyyy-mm-dd.
yyyy-mm-dd
I am currently using a regex to validate the string format, which works ok,
Determine if any string is a date
function checkIsAValidDate($myDateString){ return (bool)strtotime($myDateString); }