note 38589 added to function.date
| From: | meatdomainadaptivetimedotcompodre at rn2 dot php dot net | Date: | Sun, 28 Dec 2003 23:18:51 +0000 |
| Subject: | note 38589 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-62620@lists.php.net to get a copy of this message | ||
i wanted a fast way to add/subtract from a timestamp and this is what i got.
date('YmdHis',date('U',$mytimestamp+1571971344+3*60*60*24))
This will add 3 days (3*60*60*24 seconds)
I had to add 1571971344 seconds to get it to return the correct date/time. This may be a
"feature" or fixed already(I'm using a old version). Still good code to have!
Enjoy,
Gravis
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+38589
Delete -- http://master.php.net/manage/user-notes.php?action=delete+38589&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+38589&report=yes
Search -- http://master.php.net/manage/user-notes.php