incubator-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johndam...@apache.org
Subject svn commit: r1781054 - /incubator/public/trunk/report_reminders.py
Date Tue, 31 Jan 2017 10:50:25 GMT
Author: johndament
Date: Tue Jan 31 10:50:25 2017
New Revision: 1781054

URL: http://svn.apache.org/viewvc?rev=1781054&view=rev
Log:
If day 1 == wednesday, the board meeting is still on the third wednesday.

Modified:
    incubator/public/trunk/report_reminders.py

Modified: incubator/public/trunk/report_reminders.py
URL: http://svn.apache.org/viewvc/incubator/public/trunk/report_reminders.py?rev=1781054&r1=1781053&r2=1781054&view=diff
==============================================================================
--- incubator/public/trunk/report_reminders.py (original)
+++ incubator/public/trunk/report_reminders.py Tue Jan 31 10:50:25 2017
@@ -26,10 +26,10 @@ from email.mime.text import MIMEText
 
 def findWednesday(d, weeks):
     days_ahead = 2 - d.weekday()
-    if days_ahead <= 0:
+    if days_ahead < 0:
         days_ahead += weeks * 7
     else:
-        days_ahead += (weeks - 1) * 7 #we're after wednesday, give less time
+        days_ahead += (weeks - 1) * 7 #we're on or after wednesday, give less time
     return d + datetime.timedelta(days_ahead)
 
 fp = open('email_reminder_template.txt', 'rb')
@@ -71,6 +71,9 @@ wikiPage = thisMonth.strftime("%B%Y")
 dueDateFormat = podlingReportsDue.strftime("%a, %B %d")
 boardMeetingFormat = boardMeeting.strftime("%a, %d %B %Y")
 
+print dueDateFormat
+print boardMeetingFormat
+
 emailBodyString = messageBody.format(boardMeetingFormat, dueDateFormat, wikiPage)
 
 s = SMTP('mail-relay.apache.org')



---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@incubator.apache.org
For additional commands, e-mail: cvs-help@incubator.apache.org


Mime
View raw message