In this task, you are given a date in "dd/mm/yyyy" format. You need to check if the date is valid or not. Return 1 if it is valid, else return 0. A date is valid if the components day("dd"), month("mm") and year("yyyy") are all valid individually. A day(dd) is valid if it: a) lies between 1 and 31 for the months of January, March, May, July, August, October, December, b) lies between 1 and 28 for February on non-leap years and between 1-29 on leap years, c) lies between 1-30 for all other months. A month(mm) is valid if it lies in the range from 1 to 12 as there are 12 months in a year. A year is always valid if it is expressed in the form of "yyyy".
--------
Question: 30/17/1310

Answer: 0


Question: 31/03/1102

Answer: 1


Question: 01/05/1658

Answer:
1