Re: Re: Need for Date-object

From: Date: Tue, 17 Jul 2001 23:26:22 +0000
Subject: Re: Re: Need for Date-object
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-846@lists.php.net to get a copy of this message
At 19:16 2001-07-17 -0300, you wrote:
I think you are asking the wrong question to solve you problem. You are asking for something to handle with all possible date formats that you may find? I think the question should be, how to not have to handle with all those formats?
I don't think we're talking about the same thing. I'm not asking for something to handle all possible date formats. My problem is not handling different databases date formats. Had that been the case I would've used my own classes or MetaData and been happy. Now, PEAR is supposed to provide a _common_ set of classes and components to use. However, whenever you use a date or time as a parameter or return value you will find that there are a multitude of ways to represent dates and times. Additionally, if you wan't to write solid applications you have to add error-checking. For example, say that you have to functions, A and B. A recieves and returns ISO 8601 dates, B recieves and returns timestamps. If you wanted to call B from A you would have to convert ISO 8601 to timestamp, send it, have B do errorcheck (for things such as characters etc.) and when returned from B you would have to convert it back to ISO 8601. A lot of hassle that will be avoided if you used an atomic date object. /erik hjortsberg

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