« MediaWiki:Common.js » : différence entre les versions
De Inkipédia
aucun résumé des modifications
Aucun résumé des modifications |
Aucun résumé des modifications |
||
Ligne 32 : | Ligne 32 : | ||
// Gets the time remaining until the next stage rotation | // Gets the time remaining until the next stage rotation | ||
function getStageCountdown(now) { | function getStageCountdown(now) { | ||
var hour = Math.floor(now / 3600000) % 24 | var hour = Math.floor(now / 3600000) % 24; // Add 2 for UTC bias | ||
var now = hour * 3600000 + now % 3600000; // Current adjusted hour | var now = hour * 3600000 + now % 3600000; // Current adjusted hour | ||
var target = (hour + 4 & -4) * 3600000; // Target hour | var target = (hour + 4 & -4) * 3600000; // Target hour |