How to find out what the date was 5 days ago?
Posted
by Lost_in_code
on Stack Overflow
See other posts from Stack Overflow
or by Lost_in_code
Published on 2010-04-25T16:20:02Z
Indexed on
2010/04/25
16:23 UTC
Read the original article
Hit count: 178
php
Well, the following returns what date was 5 days ago:
$days_ago = date('Y-m-d', mktime(0, 0, 0, date("m") , date("d") - 5, date("Y")));
But, how do I find what was 5 days ago from any date, not just today?
For example: What was 5 days prior to 2008-12-02?
© Stack Overflow or respective owner