You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by br...@apache.org on 2017/03/31 12:41:17 UTC
[whimsy] branch master updated: [WHIMSY-76] correctly move to the
previous month
This is an automated email from the ASF dual-hosted git repository.
brett pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new faa7e7f [WHIMSY-76] correctly move to the previous month
faa7e7f is described below
commit faa7e7fc5311f0a4823f4f5f2855b459e26ca3b0
Author: Brett Porter <br...@safetyculture.io>
AuthorDate: Fri Mar 31 23:09:44 2017 +1100
[WHIMSY-76] correctly move to the previous month
This will ensure that dates beyond the end of the last month "round down" to
the last day of the month, e.g. a month before 31 March is 28 February
instead of attempting 31 February
---
www/board/agenda/views/actions/posted-reports.json.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/board/agenda/views/actions/posted-reports.json.rb b/www/board/agenda/views/actions/posted-reports.json.rb
index 5743429..db0a7e3 100755
--- a/www/board/agenda/views/actions/posted-reports.json.rb
+++ b/www/board/agenda/views/actions/posted-reports.json.rb
@@ -13,7 +13,7 @@ THREAD = "https://lists.apache.org/thread.html/"
# only look at emails that were received in the last month.
current = Date.today.strftime('%Y%m')
previous = (Date.parse(current + '01')-1).strftime('%Y%m')
-cuttoff = Date.parse(previous + Date.today.strftime('%d')).to_time
+cuttoff = (Date.today << 1).to_time
# get a list of current board messages
archive = Dir["/srv/mail/board/#{previous}/*", "/srv/mail/board/#{current}/*"]
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].