If you search for PHP-based calendar utilities on the Web you will find lots of solutions. Some are good, others are not. However, in most cases you will experience some constraints. Several libraries have month/day names hard-coded or are tied to a specific output format.
PEAR::Calendar
helps you generate calendar structures without forcing you to generate a certain type of output or depending on a special data store as back end. It simplifies the task of generating tabular calendars and allows you to render whatever output you like (e.g. HTML, WML, ASCII).
The package provides classes representing all important date entities like year, month, week, day, hour, minute, and second. Each date class can build subordinated entities. For instance an object representing a month is able to build contained day objects. Try the following script to build and fetch objects for each day in December 2005:
// Switch to PEAR::Date engine define('CALENDAR_ENGINE', 'PearDate...