You work in a development team. The front-end developer creates a registration form and goes on vacation. Unfortunately, the form has a mistake with the date of birth field. It's just a text field without input format. And now, new users have various layouts of dates saved in the database.
You need to fix this! You might get the date inputs from users in one of the following ways:
year.month.dayyear-month-dayyear/month/day
Take notice that the date input can also contain errors! You need to print the date in the correct layout: year/month/day; To do this, you can use the CorrectFormat constant.
Finally, if the date input has an error, print the message: Date format is invalid.