Need for Date-object

From: Date: Tue, 17 Jul 2001 13:54:33 +0000
Subject: Need for Date-object
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-839@lists.php.net to get a copy of this message
I always find it a hassle to use date and time data in my php applications. One have to convert and parse between mktime() and date() and have to keep track of different parameters and different formats. This is due to php absent handling of atomic dates, ie. objects. Treating them as strings is not very efficient code-wise. I've used some date-classes I've done myself, but it is clear that all would benefit from a standardized way of handling dates. And I think if would fit perfectly into what PEAR is about if we could provide a solid date-class. Now, I know that there's already a Date_Date class, but that consists solely of static functions and cannot be used to provide atomic date-objects. Furthermore, this is something that's already been tackled by all major object-capable languages. So there's no need to reinvent the wheel. So I ask all of you, given experiences from other languages, what interface and functions would you wan't to see in a common date-object? /erik hjortsberg

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