How to do this: in the morning the light is on, but not at night, and what time would the user take?

  • one
    That would be the specifics. ) - rnd_d 5:17 pm

1 answer 1

var date = new Date(); if( date.getHours() > 6 and date.getHours() < 22){ //горит }else{ //не горит }