Eric Smith <e...@trueblade.com> added the comment:

datetime.datetime passes its format string to strftime:

>>> import datetime
>>> x = datetime.datetime(2001, 1, 2, 3, 4)
>>> x.strftime('%Y-%m-%d')
'2001-01-02'
>>> '{0:%Y-%m-%d}'.format(x)
'2001-01-02'

I'll check to make sure this is documented.

----------
assignee:  -> eric.smith
components: +Documentation -Library (Lib)
nosy: +eric.smith
stage: test needed -> 

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7789>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to