date.timetuple()
Return a time.struct_time such as returned by time.localtime(). The hours, minutes and seconds are 0, and the DST flag is -1. d.timetuple() is equivalent to time.struct_time((d.year, d.month, d.day, 0, 0, 0,
d.weekday(), yday, -1)), where yday = d.toordinal() - date(d.year, 1,
1).toordinal() + 1 is the day number within the current year starting with 1 for January 1st.