Skip to content

Ветвление алгоритма в зависимости от времени суток #200

Discussion options

You must be logged in to vote

Если не будет совпадать, попробуйте настроить часовой пояс

let hour = new Date().getHours();
if (hour == 14) {

} else if (hour == 15) {

} else {
    
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Bondian
Comment options

Answer selected by Bondian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants