Re: Call for Votes: PEAR::Calendar

From: Date: Fri, 24 Oct 2003 23:41:41 +0000
Subject: Re: Call for Votes: PEAR::Calendar
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22979@lists.php.net to get a copy of this message
On Thu, 23 Oct 2003 00:23:50 +0200, Harry Fuecks wrote: > Proposed Name: Calendar > Proposed Category: Calendar (new namespace) [snip] So, I gave a try at this new little toy... I confirm my first impressions: I am impressed with this one. Even if the "too-many-classes" feeling is right under your skin, and the API is a bit too complex to understand (at least it requires more than a quick sight - maybe a brief tutorial on how to use combined classes would help), I have to say that this package does its job *perfectly*. Just following the examples, I was able to set up my scheduling app in no time. I wasn't able to find another class with this level of abstraction to allow complete output customization, and at the same time so complete I didn't need to hack it... For instance, setting an arbitrary day as first day of the week instead of the default one is a breeze. "Empty" days follow the new setting like a charm. The code is really clean, everything is easy to understand even if it wasn't clear just by looking at the API docs. However, here's a list of changes I'd like to see: 1) last*() should be called prev*(). I think they can be misleading. E.g., lastDay() suggests me "the last day of the year", not "the day before the current one". prevDay() is easier to understand, IMO. 2) use PEAR::Date as backend 3) follow a directory structure as every PEAR pkg does: Calendar_Engine_Factory.php should be Calendar/Engine/Factory.php and follow CS like using "require_once" 4) I like Alan's proposal of handling dates this way: > $nextday = $date->make($date->year, $date->month, $date+1); > $nextmonth = $date->make($date->year, $date->month+1, $date); This said, I'm +1 on both the name and the category. Vote : +1 Review : Reviewed the code and examples, and implemented a scheduling app on top of it. account: quipo Best regards, Lorenzo

« previous php.pear.dev (#22979) next »