I\'m trying to calculate the difference between two dates in \"weeks of year\". I can get the datetime object and get the days etc but not week numbers. I can\'t, of course,
This is a very simple solution with less coding everyone would understand.
from datetime import date d1 = date(year, month, day) d2 = date(year, month, day) result = (d1-d2).days//7