<p id="time">22:30</p>
<p id="time2">06:00</p>
<p id="textStatus"></p>
<p id="textStatus2"></p>
let textStatus = document.getElementById('textStatus')
let textStatus2 = document.getElementById('textStatus2')
time = document.getElementById('time')
time2 = document.getElementById('time2')
function status() {
if (document.getElementById('time') <= '18:00' && document.getElementById('time') >= '06:00'){
textStatus.innerHTML = 'day'
}else if (document.getElementById('time') >= '18:00' && document.getElementById('time') < '23:00'){
textStatus.innerHTML = 'evening'
}else if (document.getElementById('time') >= '23:00' && document.getElementById('time') < '06:00'){
textStatus.innerHTML = 'night'
}
}
setInterval(status, 100)