File Exchange

image thumbnail

HTML calendar generator

version (3.2 KB) by Toby Driscoll
HTMLCAL creates a web page with nicely formatted monthly calendars over a date range of your choosin

1 Download

Updated 31 Aug 2007

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

HTMLCAL produces an HTML file with formatted monthly calendars, useful for web pages. You can choose the range of months, the name of the output file, and the days of the week to be included. The calendars are formatted using an embedded CSS style sheet, so it's easy to make global changes to the appearance of your calendars.

When I teach matlab-intensive courses, I post a calendar on the class web page and create a link for each date to a matlab diary (or published output) of that day.

Cite As

Toby Driscoll (2020). HTML calendar generator (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Tom Lucas

This is a very interesting and impressive code. I have learned much from studying it.

There is a minor bug that leads to 2 January's of 2007 and none for 2008, for example. It comes from line 80:

Year = y0 + floor(m/13);

One fix might be:

Year = y0 + (m-Month)/12;

Anyway, great app!

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux