TT calendar library What is the TT calendar library?
What is the TT calendar library?

The TT calendar library is a PHP library for producing and manipulating calendar months as HTML. It simplifies the process of producing a calendar as an HTML table, and allows individual days and ranges of days to be coloured or enclosed in anchor tags at will. It has been tested with PHP versions greater than 4.0.6.

Below are typical examples of output produced by the TT calendar library.

SMTWTFS
123
45678910
11121314151617
18192021222324
25262728293031
SunMonTueWedThuFriSat
123
45678910
11121314151617
18192021222324
25262728293031
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
29
SMTWTFS
12345
6789101112
13141516171819
20212223242526
27282930

This software is free open source software released under the terms of the GNU Lesser General Public Licence.

The library contains the following functions:
returnmonthlength - Returns the number of days in a given month.
returnmontharray - Returns a month array for a given month.
dayrangecolour - Changes the colour of a range of days in a month array.
daycolour - Sets all instances of a given weekday in a month array to a specified colour.
dayrangelink - Applies an HTML link tag to a range of days in a month array.
returnmonthhtml - Returns an HTML table from a month array.

To use these functions, simply include() the file ttcalendar.php distributed with this documentation.

These functions are, like most free software, always open for improvement. If you have any comments or suggestions about the software or this documentation, please feel free to voice them in the forums at http://www.technotoad.com.
Contents returnmonthlength