Class: MiniCal
- Package: saf.Date
- Author: John Luxford <lux@simian.ca>
- Copyright: Copyright (C) 2004, Simian Systems Inc.
- License: http://www.sitellite.org/index/license Simian Open Software License
- Version: 1.0, 2004-04-26, $Id: Mini.php,v 1.1.1.1 2005/04/29 04:44:34 lux Exp $
- Access: public
A mini calendar class, useful for displaying tiny monthly calendar summaries
in a web site or application UI.
Usage Example
<?php
loader_import ('saf.Date.Calendar.Mini');
$cal = new MiniCal ($parameters['minical']);
$cal->addLink (5, '/index/sitellite-calendar-event-action?id=3');
$cal->addLink (16, '/index/sitellite-calendar-event-action?id=5');
$cal->addLink (21, '/index/sitellite-calendar-event-action?id=7');
$cal->addLink (26, '/index/sitellite-calendar-event-action?id=9');
echo $cal->render ();
?>
Return to Top
Properties
Return to Top
Methods
MiniCal ($mc)
Constructor method.
addLink ($day, $link)
Sets the specified day to link to the specified link.
prevDate ()
- Access: public
- Return: string
Returns the previous month as a $mc value.
nextDate ()
- Access: public
- Return: string
Returns the next month as a $mc value.
monthName ()
- Access: public
- Return: string
Returns the name of the current month.
isActive ($r, $c)
- Access: public
- Return: boolean
Determines whether the specified row and column is active.
isLink ($day)
- Access: public
- Return: boolean
Determines whether there is a link for the specified day.
isCurrent ($day)
- Access: public
- Return: boolean
Determines whether the specified day is the current date.
isWeekend ($day)
- Access: public
- Return: boolean
Determines whether the specified day is on a weekend.
render ()
- Access: public
- Return: string
Renders the HTML calendar.
Return to Top