the following code works. it's simple but i'm sure there will be a better and/or more optimal way to write it without using jquery but i don't know of any other way to do it and keep it working as it does now.
<script>
function getStylesheet() {
var currentTime = new Date().getHours();
if (5 <= currentTime&¤tTime < 11) {
document.write("<link rel='stylesheet' href='{T_THEME_PATH}/morning.css'>");
}
if (11 <= currentTime&¤tTime < 16) {
document.write("<link rel='stylesheet' href='{T_THEME_PATH}/day.css'>");
}
if (16 <= currentTime&¤tTime < 22) {
document.write("<link rel='stylesheet' href='{T_THEME_PATH}/evening.css'>");
}
if (22 <= currentTime&¤tTime <= 24 || 0 <= currentTime&¤tTime < 5) {
document.write("<link rel='stylesheet' href='{T_THEME_PATH}/night.css'>");
}
}
getStylesheet();
edit: i'm just needing to know if there is a better way to write the js i posted. better as in what flaws or incorrect coding i have