[Zope] - strftime for DateTime

Jim Fulton jim@digicool.com
Thu, 07 Jan 1999 12:56:02 +0000


skip@calendar.com wrote:
> 
> The appended context diff seems to do what Jim asked for.  Here's a simple
> session:
> 
>     >>> import DateTime, time
>     >>> dt = DateTime.DateTime(time.time())
>     >>> dt.strftime("%Y-%m-%d")
>     '1999-01-07'
>     >>> getattr(dt, "%Y-%m-%d")
>     <DateTime.DateTime.strftimeFormatter instance at 8116570>
>     >>> getattr(dt, "%Y-%m-%d")()
>     '1999-01-07'

Thanks.  This'll be in the next release.

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (540) 371-6909              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.