Re: date from day (count) of year

2015-04-24 Thread Vincent Davis
On Fri, Apr 24, 2015 at 8:01 AM, Ian Kelly wrote: > >>> dt.date(2014, 1, 1) + dt.timedelta(114 - 1) > datetime.date(2014, 4, 24) > ​Thanks!​ Vincent Davis -- https://mail.python.org/mailman/listinfo/python-list

Re: date from day (count) of year

2015-04-24 Thread Ian Kelly
On Apr 24, 2015 7:45 AM, "Vincent Davis" wrote: > > How does one get the date given the day of a year. > > >>> dt.datetime.now().timetuple().tm_yday > > 114 > > How would I get the Date of the 114 day of 2014? You could use a timedelta: >>> dt.date(2014, 1, 1) + dt.timedelta(114 - 1) datetime.da

date from day (count) of year

2015-04-24 Thread Vincent Davis
How does one get the date given the day of a year. >>> dt.datetime.now().timetuple().tm_yday 114 How would I get the Date of the 114 day of 2014? Vincent Davis -- https://mail.python.org/mailman/listinfo/python-list