I have to understand whether the given string is in YYYY-MM-DD format.
YYYY-MM-DD
I was tetsting using the following code snippet:
const isValidDate