I am checking for a valid date
scrpt.bash test 2019-05-03
date -d $2 2>: 1>:; c=$?
$c is 1 then the date is invalid. If I enter
2019-05-03 I will get a 0 which is correct. If i enter
2019-05-03u I get a 0 which is incorrect. I can enter
2019-05-03uu then it throws an error. How can I just check if the date is valid.