View source for MediaWiki:Gadget-fix-schedule-times.js
Jump to navigation
Jump to search
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
// vim: ts=4 sw=4 et ai si
$.when(
$.ready
).then( function () {
// quit immediately if dontFixSchedule is in the URL after the ?
if(window.location.search.indexOf("dontFixSchedule")>=0)return;
// Configuration
var CONFERENCE_DAYS = {
"Friday, October 8": Date.UTC( 2021, /* month index, not month number! */ 9, 8 ),
"Saturday, October 9": Date.UTC( 2021, 9, 9 ),
"Sunday, October 10": Date.UTC( 2021, 9, 10 )
};
var WRITTEN_SCHEDULE_OFFSET_SECONDS = -4 * 3600; // written schedule for WCNA 2021 is Eastern Time which is UTC-4
// Other constants
var TIME_REGEX = /(\d\d):(\d\d)( - (\d\d):(\d\d)|\+)/;
function formatRelativeTime( minutesUntilStart, minutesUntilEnd, countdownDuringEvent ) {
if ( minutesUntilStart > /* one day */ 1440 ) {
return "in " + ( minutesUntilStart / 1440 ).toFixed( 0 ) + " days";
000
1:0
Return to MediaWiki:Gadget-fix-schedule-times.js.