The intention of this question is to gather solutions to date / time calculation using the built in Date class instead of writing long complicated functions.
I’ll wr
You can easily find out if a year was a leap year without coding all the exceptions to the rule by using the Date class. By subtracting one day from marts the 1st (requesting marts the 0th), you can find the number of days in February.
Remember that month is zero-indexed so Marts being the 3rd month has index 2.
function CheckIfYearIsLeapYear(year:uint):Boolean
{
return new Date(year, 2, 0).Date == 29;
}