Skip to content

Commit

Permalink
fix hours
Browse files Browse the repository at this point in the history
  • Loading branch information
positivecrash committed Jun 10, 2024
1 parent 824f83a commit a965922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ const nextsession = computed( () => {
const nowday = parseInt(new Date(Date.now()).toLocaleString('en-US', { timeZone: timezone, day: '2-digit' }));
const nowhour = parseInt(new Date(Date.now()).toLocaleString('en-US', { timeZone: timezone, hour: '2-digit', hour12: false }));
if(nowday < 17 && nowhour < 20 ) {
if(nowday < 17 && nowhour <= 20 ) {
if(nowhour >= 10 && nowhour < 20) {
return new Date(Date.now()).toLocaleDateString('en-US', { timeZone: timezone, dateStyle: 'medium'}) + ' 20:00 GMT+3';
} else {
const day = new Date();
if(nowhour > 20) {
if(nowhour >= 20) {
day.setDate(new Date().getDate() + 1);
}
Expand Down

0 comments on commit a965922

Please sign in to comment.