javascript to find leap year
It’s safer to use Date objects for datetime stuff, e.g. isLeap = new Date(year, 1, 29).getMonth() == 1 Since people keep asking about how exactly this works, it has to do with how JS calculates the date value from year-month-day (details here). Basically, it first calculates the first of the month and then adds N … Read more