php-general | 2003022
Date: 02/26/03
- Next message: Chris Shiflett: "Re: [PHP] date, "first of next month"?"
- Previous message: Bryan Koschmann - GKT: "[PHP] date, "first of next month"?"
- In reply to: Bryan Koschmann - GKT: "[PHP] date, "first of next month"?"
- Next in thread: Bryan Koschmann - GKT: "Re: [PHP] date, "first of next month"?"
- Reply: Bryan Koschmann - GKT: "Re: [PHP] date, "first of next month"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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...
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Chris Shiflett: "Re: [PHP] date, "first of next month"?"
- Previous message: Bryan Koschmann - GKT: "[PHP] date, "first of next month"?"
- In reply to: Bryan Koschmann - GKT: "[PHP] date, "first of next month"?"
- Next in thread: Bryan Koschmann - GKT: "Re: [PHP] date, "first of next month"?"
- Reply: Bryan Koschmann - GKT: "Re: [PHP] date, "first of next month"?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

