/number-of-weeks

Calculates the number of weeks in a given month, assuming each week starts on a Sunday.

Primary LanguageJavaScriptMIT LicenseMIT

number-of-weeks

An algorithm that calculates the number of weeks (full or partial) within a given month, based on Sunday being the first day of the week.

vanilla.js shows how this can be done using plain JS (no dependencies).

luxon.js shows how this can be done using luxon.

Made for Alex and Jon.