Skip to content

Commit

Permalink
Update tz.html to 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
iamzoltan authored Dec 6, 2023
1 parent a991005 commit 43b525e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h5 class="card-header">Time slot selector</h5>
<br>
</div>

<span class="timezone-header"><i>CHOOSE YOUR TIMEZONE (based on July 2023):</i></span> <select class="js-Selector" onchange="onChange()" id='timezone'>
<span class="timezone-header"><i>CHOOSE YOUR TIMEZONE (based on July 2024):</i></span> <select class="js-Selector" onchange="onChange()" id='timezone'>
</select>
<br><br>
<p><span style = "font-size:13pt;"><i> Course times:</i></span></p>
Expand Down Expand Up @@ -254,7 +254,7 @@ <h5 class="card-header">Time slot selector</h5>
.reduce((memo, tz) => {
memo.push({
name: tz,
offset: moment("2023-07-11").tz(tz).utcOffset()
offset: moment("2024-07-11").tz(tz).utcOffset()
});

return memo;
Expand All @@ -263,7 +263,7 @@ <h5 class="card-header">Time slot selector</h5>
return a.offset - b.offset
})
.reduce((memo, tz) => {
const timezone = tz.offset ? moment("2023-07-11").tz(tz.name).format('Z') : '';
const timezone = tz.offset ? moment("2024-07-11").tz(tz.name).format('Z') : '';

return memo.concat(`<option value="${tz.name}">(GMT${timezone}) ${_t(tz.name)}</option>`);
}, "");
Expand Down Expand Up @@ -325,7 +325,7 @@ <h5 class="card-header">Time slot selector</h5>

var deltas = []
for(var prop in startTimes0) {
var startTime0 = moment.tz("2023-07-13 " + startTimes0[prop][0], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var startTime0 = moment.tz("2024-07-13 " + startTimes0[prop][0], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var fracHour = Number(startTime0.substr(0, 2)) + Number(startTime0.substr(3, 2)) / 60.0;
deltas.push(Math.abs(fracHour - 8.6));
}
Expand All @@ -335,11 +335,11 @@ <h5 class="card-header">Time slot selector</h5>
var theStr = "<p>";
var i = 0;
for(var prop in startTimes) {
var startTime = moment.tz("2023-07-13 " + startTimes[prop][0], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var endTime = moment.tz("2023-07-13 " + startTimes[prop][1], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var startTime = moment.tz("2024-07-13 " + startTimes[prop][0], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var endTime = moment.tz("2024-07-13 " + startTimes[prop][1], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);

var startTime2 = moment.tz("2023-07-13 " + startTimes2[prop][0], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var endTime2 = moment.tz("2023-07-13 " + startTimes2[prop][1], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var startTime2 = moment.tz("2024-07-13 " + startTimes2[prop][0], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);
var endTime2 = moment.tz("2024-07-13 " + startTimes2[prop][1], "UTC").clone().tz(document.getElementById('timezone').value).format().substr(11, 5);

var bold = false;
if( bestDelta == i) {
Expand Down

0 comments on commit 43b525e

Please sign in to comment.