<a class="toolate" href="#popup:toolate"></a>
<a class="dayoff" href="#popup:dayoff"></a>
<script type="text/javascript">
var day = new Date();
var hour = day.getHours();
var numday = day.getDay();
$(document).ready(function () {
if ( (hour >= 18 || hour < 9) && numday < 6 && numday > 0 ) {
setTimeout(function () {$('.toolate')[0].click(); }, 5000);
};
if ( (hour >= 17 || hour < 11 ) && ( numday > 5 || numday < 1 ) ) {
setTimeout(function () { $('.dayoff')[0].click();}, 5000);
};
});
</script>
<a class="toolate" href="#popup:toolate"></a>
<a class="dayoff" href="#popup:dayoff"></a>
<script type="text/javascript">
let timeZone = +10; // Разница во времени UTC+10 Владивосток
let day = new Date();
let utc = day.getTime() + (day.getTimezoneOffset() * 60000);
let DateOffset = new Date(utc + (3600000*timeZone));
let hour = DateOffset.getHours();
let numday = DateOffset.getDay();
$(document).ready(function () {
if ( (hour >= 18 || hour < 9) && numday < 6 && numday > 0 ) {
setTimeout(function () {$('.toolate')[0].click(); }, 5000);
};
if ( (hour >= 17 || hour < 11 ) && ( numday > 5 || numday < 1 ) ) {
setTimeout(function () { $('.dayoff')[0].click();}, 5000);
};
});
</script>
<script type="text/javascript">
let day = new Date();
let hour = day.getHours();
let numday = day.getDay();
$(document).ready(function () {
let dayText;
switch (numday) {
case 1: dayText ='ПН'; break;
case 2: dayText ='ВТ'; break;
case 3: dayText ='СР'; break;
case 4: dayText ='ЧТ'; break;
case 5: dayText ='ПТ'; break;
case 6: dayText ='СБ'; break;
case 0: dayText ='ВС'; break;
};
if(dayText) $('.t001__title').text(dayText);
});
</script>