Different Stylesheets for Different Days of the Week

Avatar of Chris Coyier
Chris Coyier on
<script type="text/javascript">
dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
dayNumber = new Date().getDay();
document.writeln('<link rel="stylesheet" type="text/css" href="' + dayNames[dayNumber] + '.css">');

<link rel="stylesheet" type="text/css" href="default.css">

Name your css files accordingly: Saturday.css, Friday.css, Sunday.css, etc…

If JavaScript is disabled in the browser, it will revert back to the default.css file.