Re: Proposal for Changes to PEAR::Date
| From: | Firman Wandayandi | Date: | Mon, 12 May 2008 03:09:40 +0000 |
| Subject: | Re: Proposal for Changes to PEAR::Date | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50088@lists.php.net to get a copy of this message | ||
Mason,
On Mon, May 12, 2008 at 8:00 AM, Mason Malone <mrmalone@gleim.com> wrote:
>
> 1) Migrate entire package to PHP5. As many of you know, PHP4 has been
> discontinued and there will be no more updates to it, security-related
> or otherwise, after August 8 (see
> http://www.php.net/archive/2008.php#2008-01-03-1), so I think
> it's a
> good time to drop PHP4 support. Also, the release of PHP6 is in sight,
> and supporting all three major versions of PHP is going to be
> impractical if not impossible, as I understand it.
>
I have planned to create the Date2 which is written in PHP5 syntax
strict also PHP6 if possible. It's not migrate entire package, but
create it from scratch and use the bundled DateTime and DateTimeZone
object to work. May also keep or remove the existing classes such as
Date_Calc, Date_Span. Yet it is still not started since we busy to
kick the Date's bugs.
> 2) Add an option to not load the $_DATE_TIMEZONE_DATA array and instead
> use the built-in PHP 5 DateTimeZone class for getting timezone data.
> However, I'm not really sure if this is feasible, since I can't figure
> out how DATE_TIMEZONE_DATA was generated. Keys such as 'longname' and
> 'dstlongname' do not appear to have any basis in the latest zoneinfo
> database. If I'm missing something, please tell me. Otherwise, I can take
> the additional metadata that can't be
> found using DateTimeZone and store it in a separate array (generated
> from $_DATE_TIMEZONE_DATA at packaging time), which would only be loaded
> when the aforementioned option is turned on. Some lazy loading
> functionality will be incorporated so loading of the array will be
> deferred until it's needed.
>
Use the DateTimeZone to grab the data is better for sure.
--
Firman Wandayandi <http://firmanw.org/>