PDA

View Full Version : while tweaking the calendar template ...


meandean
09-03-2006, 01:23 PM
While tweaking the calendar template ...

... I noted I had no way of knowing which day of the week a variable represented.

Meaning, I'm moving away from tables in tables to using Eric Meyer's CSS table approach.

That however means I need to identify which day == "Sat" so I can end my "float:left"'s for each week.

Looking at /libs/calendar/calendar_class.php, I note that on line 95, the day object member name renders as date('dMy',$this->timestamp) ... or "03Sep06"

since this may already be in use, could we simply add another member:
var $weekday;
$this->weekday = date('D',$this->timestamp);

?

That way, I can then in the calendar template:
{if $month->days.$day->weekday == "Sat" }

THanks!