User:R-41/vector.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
<source lang=javascript>
function EnforceWikiBreak() {
    alert ("EnforceWikiBreak running...");
    var currentdate = 2013, March, 31;
    var enforced_break_end = 2113, March, 31;
    alert ("End date: 2113, March, 31" + enforced_break_end.toLocaleString() + " Now: 2013, March, 31" + currentdate.toLocaleString() );
    if (currentdate > enforced_break_end) {
      alert ("Current date is after break end date");
    } else {
      alert ("Current date before break end date");
    }
    alert ("EnforceWikiBreak done.");
}