Changeset 99
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
recur.py
r98 r99 365 365 If weekday is out of bounds (0-6), it will be brought in bounds. 366 366 """ 367 if hasattr(startDate, 'time'): 368 startDate = startDate.date() 367 369 weekday = int(weekday) 368 370 offset = (7 + weekday) - startDate.weekday() … … 413 415 sequence, that last item is not yielded, and the sequence ends. 414 416 """ 417 if hasattr(startDate, 'time'): 418 startDate = startDate.date() 415 419 day = int(day) 416 420 highzero = (day < 1) … … 490 494 sequence, that last item is not yielded, and the sequence ends. 491 495 """ 496 if hasattr(startDate, 'time'): 497 startDate = startDate.date() 492 498 month = int(month) 493 499 day = int(day) … … 727 733 if self.recurrence: 728 734 # Start a recurring, timed thread. 729 now = datetime.datetime.now() 735 try: 736 next = self.recurrence.next() 737 except StopIteration: 738 # The recurrence series was exhausted immediately. 739 return 740 # next can be either a datetime.datetime or a datetime.date - 741 # get the correct representation of "now" from either one. 742 now = getattr(next, 'now', getattr(next, 'today'))() 730 743 while True: 744 diff = next - now 745 diff = (diff.days * 86400) + diff.seconds 746 if diff >= 0: 747 self.nextrun = next 748 break 731 749 try: 732 750 next = self.recurrence.next() … … 734 752 # The recurrence series was exhausted. 735 753 return 736 diff = next - now737 diff = (diff.days * 86400) + diff.seconds738 if diff >= 0:739 self.nextrun = next740 break741 754 iv = diff 742 755 func = self._cycle
