Re: [Tutor] datetime.timedelta Output Format

2007-04-02 Thread William Allison
Kent Johnson wrote: > > It looks like Gustavo Niemeyer's dateutil module will at least do the > year/month/day calculation if not the formatting: > > In [1]: from datetime import date > In [2]: from dateutil import relativedelta > In [3]: now = date.today() > In [9]: rd = relativedelta.relativedel

Re: [Tutor] datetime.timedelta Output Format

2007-04-02 Thread Kent Johnson
William Allison wrote: > Is there a way to have the output of "print tis" in the same format as > "print now" and "print tafmsd" in the code below? > Thanks, > Will > > > savage:~ wallison$ python > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on

Re: [Tutor] datetime.timedelta Output Format

2007-04-02 Thread William Allison
Alan Gauld wrote: > "R. Alan Monroe" <[EMAIL PROTECTED]> wrote > > >>> Is there a way to have the output of "print tis" in the same format >>> as >>> "print now" and "print tafmsd" in the code below? >>> > > >>> >>> now = datetime.date.today() >>> >>> print now >>> 2007-04-01 >>> >

Re: [Tutor] datetime.timedelta Output Format

2007-04-02 Thread Alan Gauld
"R. Alan Monroe" <[EMAIL PROTECTED]> wrote >> Is there a way to have the output of "print tis" in the same format >> as >> "print now" and "print tafmsd" in the code below? >> >>> now = datetime.date.today() >> >>> print now >> 2007-04-01 >> >>> tis = now - tafmsd >> >>> print tis >> 4785 d

Re: [Tutor] datetime.timedelta Output Format

2007-04-01 Thread R. Alan Monroe
> Is there a way to have the output of "print tis" in the same format as > "print now" and "print tafmsd" in the code below? > Thanks, > Will > savage:~ wallison$ python > Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) > [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin > Type "help", "copy