date difference [SOLVED]

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

Post Reply
someberry
Forum Contributor
Posts: 172
Joined: Mon Apr 11, 2005 5:16 am

date difference [SOLVED]

Post by someberry »

Just wondering what would be the best way to test whether a timestamp is greater than, or less that a timestamp in the past/future.

For instance, a timestamp now (This current minute/second), how would you go about testing to see if it is greater/less than the timestamp on the 23:59:59, 31st July, 2005. Of course, the dates would change as we progress in history.

If you get what I mean :s
Someberry
SidewinderX
Forum Contributor
Posts: 407
Joined: Fri Jul 16, 2004 9:04 pm
Location: NY

Post by SidewinderX »

just store each time stamp as a variable and use comparison operators
<
>
==
<=
>=
Post Reply