pimteam commented on a Page, Calendar Class  -  Aug 16, 2012

Below is how the class can be used to make a HTML table with a calendar:

<?php
$_calendar = new Calendar();
$num_weeks=$_calendar->num_weeks(8, 2012); // August 2012
?>

MonTueWedThuFriSatSun
<?=$day?$day:" "?>

That's it. Obviously you can dynamically load month and year to show a dynamic calendar. I use this code in one of my scripts, just not ready to release the full script yet, that's why posting the snippet. The snippet is universal and can be used for any kind of calendar. I will be super-happy if someone can suggest good way to add configurable options for first day of the week etc.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.