// This is where every script gets list of session dates from
// must have 1 date per line (8 digits) enclosed by " symbol
// file: /resources/newsessiondates.txt
var Days=new Array(
" ", //0
"1st", //1
"2nd", //2
"3rd", //3
"4th", //4
"5th", //5
"6th", //5
"7th", //5
"8th", //5
"9th", //5
"10th", //5
"11th", //1
"12th", //2
"13th", //3
"14th", //4
"15th", //5
"16th", //5
"17th", //5
"18th", //5
"19th", //5
"20th", //5
"21st", //1
"22nd", //2
"23rd", //3
"24th", //4
"25th", //5
"26th", //5
"27th", //5
"28th", //5
"29th", //5
"30th", //5
"31st" //5
)
var Months=new Array(
" ", //0
"January", //1
"February", //2
"March", //3
"April", //4
"May", //5
"June", //6
"July", //7
"August", //8
"September", //9
"October", //10
"November", //11
"December" //12
);
var mySessions=new Array(
// 2023
"20230107",
"20230121",
"20230204",
"20230218",
"20230304",
"20230318",
"20230401",
"20230415",
"20230429",
"20230513",
"20230527",
"20230610",
"20230624",
"20230708",
"20230722",
"20230805",
// "20230819", not held
"20230902",// 2/9/2023;
"20230916",// 16/9/2023;
"20230930",// 30/09/2023;
"20231014",// 14/10/2023;
"20231028",// 28/10/2023;
"20231111",// 11/11/2023;
"20231125",// 25/11/2023
"20231209", // 09/12/2023)
// 2023
"20240106",
"20240120",
"20240203",
"20240217",
"20240302",
"20240316",
"20240330",
"20240413",
"20240427"
)
var myDate=new Date();
function thisdate() {
var dd = myDate.getDate();
var mm = myDate.getMonth() + 1;
var ccyy = myDate.getFullYear();
if (dd < 10) { dd = '0' + dd; }
if (mm < 10) { mm = '0' + mm; }
/* return (dd + '/' + mm +'/'+ ccyy); */
return ( '' + ccyy + mm + dd);
}
function prettyDate(date) {
var dd = parseInt(date.substr(6,2));
dd = Days[dd];
var mm = parseInt(date.substr(4,2));
//alert(mm);
//alert('text=' + Months[mm]);
mm = Months[mm];
var ccyy = date.substr(0,4);
return (dd + ' ' + mm +' '+ ccyy);
}
function nextSession(thisd) {
var i;
for (i=0; i< (mySessions.length ) ; i++) {
if (mySessions[i] >= thisd) { return (mySessions[i]); }
}
return ('??');
}
function Sessionafter(thisd) {
var i;
for (i=0; i< (mySessions.length ) ; i++) {
if (mySessions[i] > thisd) { return (mySessions[i]); }
}
return ('??');
}