PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
seangates
Forum Newbie
Posts: 3 Joined: Fri Dec 08, 2006 12:10 pm
Location: West Linn, Oregon
Post
by seangates » Fri Dec 08, 2006 1:48 pm
I have been searching everywhere for a good, complete date/time class. Anyone have a great one they use?
Some of the requirements would be:
1. Basic formatting
2. Functions for differences in dates
3. Being able to tell first days of months, quarters, years, etc.
4. GMT translation and daylight savings, etc.
Thanks!
Sean
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Dec 08, 2006 2:09 pm
Have you looked at the built-in one?
seangates
Forum Newbie
Posts: 3 Joined: Fri Dec 08, 2006 12:10 pm
Location: West Linn, Oregon
Post
by seangates » Fri Dec 08, 2006 2:23 pm
feyd wrote: Have you looked at the built-in one?
I believe you are implying that I can use PEAR or something, right?
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Fri Dec 08, 2006 2:27 pm
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Fri Dec 08, 2006 2:45 pm
No, there's a datetime class in PHP itself.
date_create()
It's available in newer builds, but it could be worth looking at.
seangates
Forum Newbie
Posts: 3 Joined: Fri Dec 08, 2006 12:10 pm
Location: West Linn, Oregon
Post
by seangates » Fri Dec 08, 2006 2:49 pm
Awesome. I have PHP 5.1.6, so this would work great.
Thanks!
Sean
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Fri Dec 08, 2006 3:01 pm
feyd wrote: No, there's a datetime class in PHP itself.
Oh... very cool! I didn't know that.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Fri Dec 08, 2006 3:02 pm
I can honetly say that I had never seen that object before. It is nice to know that it is there. Thanks feyd.