Re: Re: Call for Votes: PEAR::Calendar
| From: | hfuecks at phppatterns dot com | Date: | Fri, 24 Oct 2003 13:37:55 +0000 |
| Subject: | Re: Re: Call for Votes: PEAR::Calendar | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22972@lists.php.net to get a copy of this message | ||
> I must of missed the context.. - but it should eventually be.
> require_once 'Calendar/Day.php';
> (no brackets.. - require is a compiler directive, not a function)
>
> Regards
> Head of the CS Police :)
I learn something new every day! Tend to slap brackets round everything.
Congratulations on PHP-GTK 1.0 BTW - just been scaring the Perl guy, who
sits near me and like to slam PHP, with phpmole.
Thanks for the tip off on the "install-as" property Pierre - that's a big
help - wasn't aware.
One other note on that above example - the query;
$sql = "SELECT * FROM events";
If the $Year object is created earlier in the script, you could modify the
query like;
$Year = & new Calendar_Year($_GET['year']);
$sql = "SELECT * FROM events WHERE EventTime > '".$Year->thisYear(TRUE).
"' AND EventTime < '".$Year->nextYear(TRUE).";
Passing TRUE to any of the this***() methods returns a timestamp (instead
of the four digit year, in this case).