The libcalby library provides a suite of tools to manage different calendars easyly.
Currently supports Gregorian Calendar, Julian Calendar, and also support
a number of formats for date and time, including ISO, TAI64, Julian Date and
Modified Julian Date.
This very simple class makes it possible to convert unix timestamp into UTC gregorian date.
It has been tested against all possible 32bits-integers. I've been asked to write this class to apply for a job position and after I saw many people trying to find a way to make this conversion, I thought
... [More] it might help people to use it.
Work on any platform with a ANSI compiler.
If you need some more functionality, I advise you the BOOST lib. Forget about the standards mktime, localtime/gmtime. [Less]
A Calendar Object for a given month and year.
The calendar Class takes a date string (eg: "December, 2009"), and creates an array of weeks and days for that month.
This allows you to generate your own calendars in HTML or other markup.
There is also other useful properties and methods such
... [More] as getting locale specific day names, etc.
Example UsageGet a array representation of the calendar for a given month
$cal = new Calendar(); // defaults to current month
$days = $cal->getCalenderMonthDays();
var_dump($days); // array of weeks and days
Get an array representation of days in particular week
$cal = new Calendar('1/1/2009'); // for first month of 2009
$days = $cal->getCalenderWeekDays(3); // week 3
var_dump($days); // array of days for week 3
Print a HTML Month calendar
$cal = new Calendar('now'); // for this month
$html = $cal->getMonthHTML();
echo $html;Print a HTML Week calendar
$cal = new Calendar('+1 month'); // next month
$html = $cal->getWeekHTML(2); // week 2
echo $html;SourceThe latest source can be retrieved from subversion repo. [Less]