def week_date(dt): week = dt.isocalendar()[:2] return date2num(iso_to_gregorian(*week))
def week_date(item): dt = blob_to_date(item) week = dt.isocalendar()[:2] return date2num(iso_to_gregorian(*week))
def commit_to_week_num(commit): week = date_to_week(commit['date']) greg_date = iso_to_gregorian(*week) return date2num(greg_date)