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.