Re: date, "first of next month"?
| From: | 1LT John W. Holmes | Date: | Wed, 26 Feb 2003 20:40:01 +0000 |
| Subject: | Re: date, "first of next month"? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-137304@lists.php.net to get a copy of this message | ||
> Does anyone know a way to do this easily? I have a script that pretty much
> says "this is due on the first of next month" but I would like it to
> actually use the correct date.
You would think strtotime("first of next month") would work, but it doesn't.
This does:
$t = mktime(0,0,0,date('m')+1,1,date('Y'));
Gives you timestamp of first day, next month. Format accordingly with
date().
---John Holmes...