A day on the calendar (usual Gregorian calendar used in the USA) can be represen
ID: 3745283 • Letter: A
Question
A day on the calendar (usual Gregorian calendar used in the USA) can be represented as a tuple with three Int values (month,day,year) where the year is a positive integer, 1 <= month <= 12, and 1 <= day <= days_in_month. Here days_in_month is the number of days in the the given month (i.e. 28, 29, 30, or 31) for the given year. Develop a Boolean Haskell function validDay d that takes a date tuple d and returns True if and only if d represents a valid date. For example, validDay (8,20,2018) and validDay(2,29,2016} yield True and validDay (2,29,2017) and validDay(0,0,0) yield False.