Day and night css

If I have this



 if (thehour <= 19)
  display = "default.css";
   else if (thehour >= 5)
  display = "daydefault.css";
 else
  display = "default.css";

What do I need to change the numbers to in order to make default.css switch at 6 PM and last until 6 AM?


display = "default.css";
if (thehour >= 6 && thehour < 18) {
	display = "daydefault.css";
}

You are wonderful!! Thank you so much!!!

No problem :slight_smile:

What about this one?

This is for an invisionfree forum and my other script doesn’t work for this one…

<script language="javascript">
/* script created by Chandler @ http://s4.invisionfree.com/digitalized <-- a great site for skins codes and support! */
now = new Date();
itime = now.getHours();
function TSkinChange() {

if (itime >= 19) {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://hatchingyourdragons.com/daynocturne.css">');
}
if (itime <= 6) {
document.write('<LINK REL="stylesheet" TYPE="text/css" HREF="http://hatchingyourdragons.com/nightnocturne.css">');
}}

TSkinChange();
</script>