|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -# $Id: date.py,v 1.69 2004-05-19 17:12:18 a1s Exp $ |
| 18 | +# $Id: date.py,v 1.70 2004-05-23 10:23:28 richard Exp $ |
19 | 19 |
|
20 | 20 | """Date, time and time interval handling. |
21 | 21 | """ |
@@ -370,6 +370,10 @@ def local(self, offset): |
370 | 370 | return Date((self.year, self.month, self.day, self.hour + offset, |
371 | 371 | self.minute, self.second, 0, 0, 0)) |
372 | 372 |
|
| 373 | + def __deepcopy__(self, memo): |
| 374 | + return Date((self.year, self.month, self.day, self.hour, |
| 375 | + self.minute, self.second, 0, 0, 0)) |
| 376 | + |
373 | 377 | def get_tuple(self): |
374 | 378 | return (self.year, self.month, self.day, self.hour, self.minute, |
375 | 379 | self.second, 0, 0, 0) |
@@ -460,6 +464,10 @@ def __init__(self, spec, sign=1, allowdate=1, add_granularity=0, |
460 | 464 | self.second = spec |
461 | 465 | self.second = int(self.second) |
462 | 466 |
|
| 467 | + def __deepcopy__(self, memo): |
| 468 | + return Interval((self.sign, self.year, self.month, self.day, |
| 469 | + self.hour, self.minute, self.second)) |
| 470 | + |
463 | 471 | def set(self, spec, allowdate=1, interval_re=re.compile(''' |
464 | 472 | \s*(?P<s>[-+])? # + or - |
465 | 473 | \s*((?P<y>\d+\s*)y)? # year |
|
0 commit comments