Date handling in php?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Date handling in php?

Post by allspiritseve »

I remember reading somewhere about how PHP has built in DateTime and DateTimeZone classes, but I can't find anything more than a reference to them in the manual. I think the original article I read said that they were good, but a little quirky. Does anyone use them? Is there good documentation anywhere? Should I build my own objects, as described in PHP in action?
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Date handling in php?

Post by alex.barylski »

I can't think of anything, other than:

http://ca3.php.net/intl

What are you trying to achieve?
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Re: Date handling in php?

Post by allspiritseve »

PCSpectra wrote:What are you trying to achieve?
Nothing in particular, I haven't really done much with dates before and I'd like to start using objects instead of functions for them. I guess I just wanted some feedback as to whether to build my own or use the built-in php classes.
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: Date handling in php?

Post by matthijs »

Here's an article about php5 DateTime and DateTimeZone classes
http://laughingmeme.org/2007/02/27/
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Date handling in php?

Post by alex.barylski »

Cool. Thanks for the link matthijs. Never knew about those before.

Cheers,
Alex
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: Date handling in php?

Post by Luke »

I just posted like the same thread as this :) viewtopic.php?f=1&t=92194
User avatar
allspiritseve
DevNet Resident
Posts: 1174
Joined: Thu Mar 06, 2008 8:23 am
Location: Ann Arbor, MI (USA)

Re: Date handling in php?

Post by allspiritseve »

The Ninja Space Goat wrote:I just posted like the same thread as this :) viewtopic.php?f=1&t=92194
Indeed you did. Sorry about that!
Post Reply