The total days is the exact count of midnights between the two dates (UTC, so timezones can't skew it). The approximations divide that count:
Weeks = days ÷ 7 · Months ≈ days ÷ 30.44 · Years ≈ days ÷ 365.25
30.44 is the average month length (365.25 ÷ 12) and 365.25 is the average year length including leap years. The exact breakdown instead walks the real calendar — full years, then full months with their true lengths, then leftover days.