Re: Date & TimeZone classes for your consideration
| From: | Tomas V.V.Cox | Date: | Mon, 06 May 2002 11:04:39 +0000 |
| Subject: | Re: Date & TimeZone classes for your consideration | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-5983@lists.php.net to get a copy of this message | ||
+1 here too
Tomas V.V.Cox
Baba Buehler wrote:
>
> I'm working on a largish project and I found myself wanting nice generic
> date and timezone classes like those found in Java. Since I was doing most
> of the work for myself anyway, I figured I'd flush them out and submit them
> for possible inclusion in PEAR.
>
> The source, a .tar.gz, and PHPDoc for these classes are at:
> http://babaz.com/stuff/date/
>
> The two classes I have are:
>
> Date
> ----
> Generic date/time handling class. Loosely based on the java.util.Date
> class, and using much of Monte Ohrt's excellent Date::Calc class already in
> PEAR. Many Date::Calc functions are extended/wrapped to work with Date
> objects, including a full implementation of strftime()-like formatting for
> Date objects. This class also attempts to be timezone-aware, using the
> Date::TimeZone class.
>
> Date::TimeZone
> --------------
> Based on Java's java.util.Timezone, and includes timezone data extracted
> from the zoneinfo database. Tracks timezone ids, names, offsets and DST
> names. Supports conversions and DST adjustments (although DST stuff
> requires setting TZ environment var and using localtime(), so it may not
> work on all systems).
>
> These classes should meet the PEAR coding standards and have proper PHPDoc
> comments, but please let me know if I've missed anything.
>
> The package/classnames I've chosen are what seemed logical to me, though I'm
> open to changing them to whatever everyone decides.
>
> If these look good to everyone, I'll apply for a CVS account, make proper
> packages for the web site, etc.
>
> Let me know what you think.
>
> Thanks,
> baba
>
> --
> Baba Z Buehler <baba@BabaZ.com> http://BabaZ.com/ PGP
> KeyID: 0xA88A6D4C
> "Those who are willing to sacrifice freedom for security deserve neither."
> -Benjamin Franklin
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php