Skip to content

Instantly share code, notes, and snippets.

View whyDontI's full-sized avatar
😊
Working From Home

Nikhil Bhandarkar whyDontI

😊
Working From Home
View GitHub Profile
@whyDontI
whyDontI / countDateDifference.js
Last active September 25, 2020 15:45
Count the difference between two dates
/**
* Returns true if year is a leap year
* @param {Number} year
*/
function isLeapYear(year) {
return (((year % 4 == 0) && (year % 100 !== 0)) || (year % 400 == 0))
}
/**
* Returns number of days till current month from start of the year