Top

Date Addition and Subtraction

Please Register to submit score.
Average Score  7.0
Scores Submitted  1
Date Added  Nov 02, 2005
Last Updated  Nov 02, 2005
Tags  date  time  timestamp 

Introduction

I thought this was pretty neat and useful. You can combine strtotime with the date function to create your own date verbally. This is just an alternative to using mktime that's a little more intuitive.

Grab the Code

Comments

  (3)  RSS
F*U*R*B*Y*
Comments: 416
 
PHP Snippet:  Date Addition and Subtraction
Posted on Mar 10, 2006 8:51 pm
this doesn't work for me :$
Hawkee
Comments: 403
 
PHP Snippet:  Date Addition and Subtraction
Posted on Mar 14, 2006 7:07 pm
All it does is set the $date variable to a time specified by strtotime. It's a nice example of how convenient PHP makes dealing with time and dates.
F*U*R*B*Y*
Comments: 416
 
PHP Snippet:  Date Addition and Subtraction
Posted on Mar 15, 2006 2:31 am
oh okay so then i just need to echo $date

Please Register or Login to start posting comments.
Bottom