Mercurial > p > roundup > code
comparison roundup/date.py @ 1339:fe18877acc56
not fully backed-out
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 18 Dec 2002 00:15:53 +0000 |
| parents | 82ff15307f92 |
| children | e5fb7d4bf251 |
comparison
equal
deleted
inserted
replaced
| 1338:82ff15307f92 | 1339:fe18877acc56 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: date.py,v 1.39 2002-12-16 05:03:02 richard Exp $ | 18 # $Id: date.py,v 1.40 2002-12-18 00:15:53 richard Exp $ |
| 19 | 19 |
| 20 __doc__ = """ | 20 __doc__ = """ |
| 21 Date, time and time interval handling. | 21 Date, time and time interval handling. |
| 22 """ | 22 """ |
| 23 | 23 |
| 243 '[[h]h:mm[:ss]][offset]') | 243 '[[h]h:mm[:ss]][offset]') |
| 244 | 244 |
| 245 info = m.groupdict() | 245 info = m.groupdict() |
| 246 | 246 |
| 247 # get the current date as our default | 247 # get the current date as our default |
| 248 y,m,d = time.gmtime(time.time())[:3] | 248 y,m,d,H,M,S,x,x,x = time.gmtime(time.time()) |
| 249 | 249 |
| 250 # override year, month, day parts | 250 # override year, month, day parts |
| 251 if info['m'] is not None and info['d'] is not None: | 251 if info['m'] is not None and info['d'] is not None: |
| 252 m = int(info['m']) | 252 m = int(info['m']) |
| 253 d = int(info['d']) | 253 d = int(info['d']) |
