Why this answer
Count the days, not the months
Each date is turned into a day number: how many days have passed since January 1, 1970, using the real length of every month and every leap day. Subtracting the two numbers gives the days between them. Weeks are that total divided by 7.
Why not just compare the dates’ numbers? Months are 28, 29, 30 or 31 days long, so “one month later” isn’t a fixed number of days. And subtracting counts the gaps between days: from Monday to Friday is 4 days apart, but 5 days if you count both Monday and Friday. Tick “count the end day too” for the second kind.
December 25, 2026 − January 1, 2026 = 358 days