[billreminder] Forgot to add src/lib/oldactions.py to previous commit; also change scheduler functions to return da



commit d74fd204908242905801aa7fc80a871ed79d6975
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Mon Sep 28 23:09:41 2009 -0400

    Forgot to add src/lib/oldactions.py to previous commit; also change scheduler functions to return datetime.date.

 src/lib/oldactions.py |    2 +-
 src/lib/scheduler.py  |   10 ++--------
 2 files changed, 3 insertions(+), 9 deletions(-)
---
diff --git a/src/lib/oldactions.py b/src/lib/oldactions.py
index ce6de68..56de6ff 100644
--- a/src/lib/oldactions.py
+++ b/src/lib/oldactions.py
@@ -4,7 +4,7 @@ __all__ = ['Actions']
 
 import sys
 
-import dal
+import olddal as dal
 import bill
 import time
 import datetime
diff --git a/src/lib/scheduler.py b/src/lib/scheduler.py
index dd907fe..493feb3 100644
--- a/src/lib/scheduler.py
+++ b/src/lib/scheduler.py
@@ -73,10 +73,7 @@ def get_schedule_timestamp(frequency, startDate, endDate=None):
 
 def first_of_month(month, year):
     ''' Return the timestamp for the first day of the given month. '''
-    ret = datetime.datetime(year, month, 1, 0, 0, 0)
-
-    # Convert to timestamp
-    ret = timestamp_from_datetime(ret)
+    ret = datetime.date(year, month, 1)
 
     return ret
 
@@ -86,12 +83,9 @@ def last_of_month(month, year):
     nextMonthYear = year + ((month) / 12)
     goback = datetime.timedelta(seconds=1)
     # Create datetime object with a timestamp corresponding the end of day
-    nextMonth = datetime.datetime(nextMonthYear, nextMonth, 1, 0, 0, 0)
+    nextMonth = datetime.date(nextMonthYear, nextMonth, 1)
     ret = nextMonth - goback
 
-    # Convert to timestamp
-    ret = timestamp_from_datetime(ret)
-
     return ret
 
 def get_alarm_timestamp(alertDays, alertTime, origDate):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]