Re: Date-class

From: Date: Wed, 18 Jul 2001 12:21:15 +0000
Subject: Re: Date-class
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-865@lists.php.net to get a copy of this message
At 11:08 2001-07-18 +0200, you wrote:
Erik Hjortsberg wrote: Ok, I've written a date class for making atomic date instances. The current Date classes do only provide static methods. There is however a need for a common format for handling dates in an application, especially in a multi-developer situation (such as PEAR). Anyhow, a short introduction [..] I've chosen to use a timestamp as internal representation for now. That will probably change. I've also tried to keep the extra methods to a minium to keep it simple. If you want a special formatting you can do it with date('fsdafd', $date->timestamp()). Plus, the methods provided by Date_Date are also >helpful. I think all of we have developed some time a Date handler functions :) Here is mine if you want to ripe some code (doc is only in spanish but code and function names are in english). It's only for dates but support iso/english/euro dates input/output, months and days in both spanish/english (extendable), use timestamp as internal and provide the following functions:
I'm curious about the 'euro' format, such as
        $dateformat="d/m/Y";
Many of your functions are however supplied by Date_Calc, and location-support is provided by strftime().
/erik hjortsberg

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