Login   Register  
PHP Classes
elePHPant
Icontem

Class Calendar: Generate month calendar arrays

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   Screenshots Screenshots   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-07-31 (9 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 804 All time: 3,917 This week: 1,467Up
Version License Categories  
class_calendar 1.0GNU Lesser General Publ...Time and Date
Description Author  

This class can generate multi-dimensional arrays containing the days of any given month across the span of weeks that the month days occupy.

It takes a given month and year as parameters and it fills the multi-dimensional array, that represents the weeks and the week days, with the respective number of the days of the month.

The array positions that represent days before and after the current month are filled with 0.

The class can also return the month name, month length in days, tell you if a given year is a leap year or not, and the week day name of a given day of the month.

Also, worth noting, the function valid_date will make sure that any month, day, and year are within valid parameters. For example, using the date 13/32/2005 by default is invalid. If you pass this date to valid_date, it would convert that date to 2/1/2006. This is important if accepting user input from a calendar.

Picture of Ken Stanley
Name: Ken Stanley <contact>
Classes: 2 packages by
Country: United States United States
Age: 37
All time rank: 1289168 in United States United States
Week rank: 1862 Down207 in United States United States Down

Screenshots  
  • class_calendar.png
  Files folder image Files  
File Role Description
Accessible without login Plain text file ChangeLog Doc. Notes of all changes and by when and whom they are made by.
Accessible without login Plain text file class_calendar.php Class Main Class
Accessible without login Plain text file class_sqlite.php Class Simple SQLite API
Accessible without login Plain text file index.php Example Advanced Usage Example
Accessible without login Plain text file README Doc. License, Examples, and Documentation

 Version Control Unique User Downloads Download Rankings  
 0%Total:804All time:3,917
 This week:0This week:1,467Up