Can anyone extrapolate on how to implement a basic \"good evening\" or \"good morning\" based on the user\'s time setting?
Perhaps PHP will fetch the server time, but I
const now = new Date().getHours();
switch (true) {
case (now<=12): console.log("Good Morning");break;
case (now>12 && now<16): console.log("Good Afternnon");break;
case (now>=16 && now<20): console.log("Good Evening");break;
case (now>=20 && now<=24): console.log("Good Night");break;}
This code is based on JavaScript, Hope this will help you.