[Erp5-report] r39379 yo - /erp5/trunk/products/ERP5/Document/Alarm.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 20 10:50:01 CEST 2010
Author: yo
Date: Wed Oct 20 10:50:01 2010
New Revision: 39379
URL: http://svn.erp5.org?rev=39379&view=rev
Log:
Forgot to implement _getNextMonth.
Modified:
erp5/trunk/products/ERP5/Document/Alarm.py
Modified: erp5/trunk/products/ERP5/Document/Alarm.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Alarm.py?rev=39379&r1=39378&r2=39379&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Alarm.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Alarm.py [utf8] Wed Oct 20 10:50:01 2010
@@ -140,6 +140,17 @@ class PeriodicityMixin:
return date.timezone()
return None
+ def _getNextMonth(self, date, timezone):
+ year = date.year()
+ month = date.month()
+ if month == 12:
+ year += 1
+ month = 1
+ else:
+ month += 1
+
+ return DateTime(year, month, 1, 0, 0, 0, timezone)
+
def _getNextDay(self, date, timezone):
if timezone is not None:
new_date = DateTime(date.timeTime() + 86400.0, timezone)
More information about the Erp5-report
mailing list