SimpleCalendar is a very simple PHP calendar class written to be easy to use and flexible.
It includes basic event logic and is made to be modified to your particular needs.
More Details Soon
<?php
require_once('SimpleCalendar.php');
$calendar = new donatj\SimpleCalendar();
$calendar->setStartOfWeek('Sunday');
$calendar->addDailyHtml( 'Sample Event', 'today', 'tomorrow' );
$calendar->show(true);
?>
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
Sample Event | Sample Event | |||||
Click here for the Github repository.
| Build | Date | Message |
|---|---|---|
| v0.4.0 Download | Added the much requested ability to offset by days! | |
| v0.3.2 Download | Fixed a nesting issue | |
| v0.3.1 Download | Fixed a problem with the composer JSON | |
| v0.3.0 Download | PSR-0, Composer | |
| v0.2.0 Download | First tag in a long time, maintence build | |
| v0.1.0 Download | Initial Release |
The constructor on Simple Calendar takes a date string (see strtotime()) so an easy way is simply
$cal = new SimpleCalendar('+1 Month');
or
$cal = new SimpleCalendar('June 2012');
There is also a setDate method which allows you to change the date of the calendar after initial construction.