diff --git a/Misc.py b/Misc.py index 992af9b..674778f 100755 --- a/Misc.py +++ b/Misc.py @@ -2,7 +2,6 @@ # Miscellaneous Utilities (dklrt). # (c) David Keegan 2011-06-28. -from __future__ import print_function import sys def Out(*Args): diff --git a/Time.py b/Time.py index 86eda62..6386028 100755 --- a/Time.py +++ b/Time.py @@ -60,7 +60,7 @@ def DateAddYears(Seconds, Count): If Seconds is Feb 29, shifts to Feb 28, even if shifing to a leap year. """ - if not isinstance(Count, (int, long)): + if not isinstance(Count, int): _Throw("Count argument not an int!") dtd = datetime.date.fromtimestamp(Seconds) @@ -74,14 +74,14 @@ def DateAddMonths(Seconds, Count): """Shifts Seconds (a date) forward by Count months. If the day is >= 29, shifts to 28. """ - if not isinstance(Count, (int, long)): + if not isinstance(Count, int): _Throw("Count argument not an int!") dtd = datetime.date.fromtimestamp(Seconds) if not Count == 0: if dtd.day >= 29: dtd = dtd.replace(day=28) Month = (dtd.month + Count) - 1 - Years = Month / 12 + Years = Month // 12 dtd = dtd.replace(year=(dtd.year + Years)) Month = (Month % 12) + 1 dtd = dtd.replace(month=Month)