I'd like to get the number of calendar rows (weeks) in any month using momentjs
For example:
This would be 5
and this would be 6
Heres what I have to work with:
I have the month, start of month, and end of month as a moment items
const month; // (month moment obj)
const start = moment(month).startOf('month');
const end = moment(month).endOf('month');
Heres what I've tried so far (with no luck)
const weeks = end.diff(start, 'week'); // always gives 4
const weeks = moment.duration(end - start).weeks() + 1; // always gives 5
I really would prefer to use Moment.js for simplicity and accuracy. I've seen some pure JS answers on here but none of them are truly reliable.

