Re: Calendar Class

From: Date: Fri, 13 Oct 2000 16:50:52 +0000
Subject: Re: Calendar Class
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-354@lists.php.net to get a copy of this message
> Hi, > > I'm submitting a new class to the Pear repository, and I'd like to get > some feedback from some of you first, to be sure things are in order. > > The class (DATE_Calendar) is used for comparing and calculating calendar > dates, and formulating arrays of dates for traditional calendar display. > The unique aspect of the class is that it does not rely on 32-bit system > limitations, so dates that are pre 1970 or post 2038 work as expected. > > A quick example of finding the number of days between two dates: > > include("Calendar.php"); > $cal = new DATE_Calendar; > > $date_diff = > $cal->date_diff("1999","10","01","2045","01","01"); > echo "the number of days between October 1st 1999 and January 1st 2045 > is $date_diff."; > > > > Here are my foremost concerns: > > 1) the Class name: DATE_Calendar > The class was named DATE_Calendar, which would go in the repository as > DATE/Calendar.php. Is this too generic, or possibly in the wrong Pear > heirarchy? > I'd personally prefer Date_Calendar (just a matter of case). > 2) PHPdoc format > The class was formatted in the PHPdoc format. Let me know if there are > any outstanding errors. > Haven't looked it over carefully, but it seems fine. > > Class Source Pretty: > http://www.phpinsider.com/calendar/Calendar.phps > Class Source Plain: > http://www.phpinsider.com/calendar/Calendar.txt > > Here is a working example of using the class to display a calendar: > Example: > http://www.phpinsider.com/calendar/showCalendarMonth.php > > Here is a script that tests the raw functionality of the class: > http://www.phpinsider.com/calendar/test.php > > Let me know what you think. If all looks well, I'll commit it. > Looks great! -Sterling

« previous php.pear (#354) next »