Message223853
| Author |
belopolsky |
| Recipients |
belopolsky, facundobatista, r.david.murray |
| Date |
2014年07月24日.15:52:22 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1406217142.86.0.352186401624.issue22058@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
+1
There is currently no obvious way to convert either date or datetime instance to date.
The best solution I can think of is date(*x.timetuple()[:3]):
>>> d = date.today()
>>> t = datetime.now()
>>> date(*d.timetuple()[:3])
datetime.date(2014, 7, 24)
>>> date(*t.timetuple()[:3])
datetime.date(2014, 7, 24)
Certainly date(x) wins hands down over this atrocity. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年07月24日 15:52:22 | belopolsky | set | recipients:
+ belopolsky, facundobatista, r.david.murray |
| 2014年07月24日 15:52:22 | belopolsky | set | messageid: <1406217142.86.0.352186401624.issue22058@psf.upfronthosting.co.za> |
| 2014年07月24日 15:52:22 | belopolsky | link | issue22058 messages |
| 2014年07月24日 15:52:22 | belopolsky | create |
|