Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/385966 )

Change subject: Fix Wikidata birthday detection
......................................................................

Fix Wikidata birthday detection

In JavaScript, months are numbered starting from 0, so we need to
*subtract* one from the usual month number to get the right one for the
Date constructor, not add one! (Without this fix, birthday presents are
only enabled on *December* 29th.)

Change-Id: I83c3b9dad3b02ebac0b5cbd6be347ddc15eac61f
---
M wikibase/config.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/66/385966/1

diff --git a/wikibase/config.js b/wikibase/config.js
index 38e674f..68a4a4c 100644
--- a/wikibase/config.js
+++ b/wikibase/config.js
@@ -45,7 +45,7 @@
                        root: root,
                        index: root
                },
-               showBirthdayPresents: new Date().getTime() >= Date.UTC( 2017, 
10 + 1, 29 )
+               showBirthdayPresents: new Date().getTime() >= Date.UTC( 2017, 
10 - 1, 29 )
        };
 
        var hostname = window.location.hostname.toLowerCase();

-- 
To view, visit https://gerrit.wikimedia.org/r/385966
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83c3b9dad3b02ebac0b5cbd6be347ddc15eac61f
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to