var data = [
[0, 11, 'morning'],
[12, 17, 'afternoon'],
[18, 24, 'night']
],
hr = new Date().getHours();
for(var i = 0; i < data.length; i++){
if(hr >= data[i][0] && hr < = data[i][1]){
document.write(data[i][2]);
}
}
(
monkeon schmonkeon,
Mon 25 Jan 2016, 11:12,
archived)