Time-Based Content with Javascript

11 Apr 2004

I wrote a little bit of Javascript which will display different content based on the time. You can set up events, which have a start and end day of the week and a start and end time, and specify the text to print out. If the current time is within one of these events then their content will be displayed, otherwise a the default will be displayed.

Time Based Content with Javascript

It's buggy and uncommented, but it was interesting to write (took an hour, including researching multidimensional arrays in JS). If you need any support then mail me or write in the comments.

Feedback or questions on this post? Create an issue on GitHub.