Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #89367 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2015-04-24 08:01 -0600 |
| Last post | 2015-04-24 08:01 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: date from day (count) of year Ian Kelly <ian.g.kelly@gmail.com> - 2015-04-24 08:01 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2015-04-24 08:01 -0600 |
| Subject | Re: date from day (count) of year |
| Message-ID | <mailman.4.1429884123.3680.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
On Apr 24, 2015 7:45 AM, "Vincent Davis" <vincent@vincentdavis.net> 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.date(2014, 4, 24)
Back to top | Article view | comp.lang.python
csiph-web