On Sun, 21 Mar 2004, Marek Kilimajer wrote:
> Jeff Oien wrote:
> > When I do this:
> > $lastmonth = mktime(0, 0, 0, date("m")-9, date("d"), date("Y"));
>
> this will not work most of the year, if current month is August or less,
> the month value will be negative.
mktime() can take negative valu
Marek Kilimajer wrote:
Jeff Oien wrote:
When I do this:
$lastmonth = mktime(0, 0, 0, date("m")-9, date("d"), date("Y"));
this will not work most of the year, if current month is August or less,
the month value will be negative.
Use strtotime('-9 months') instead.
This code works just fine for
Jeff Oien wrote:
When I do this:
$lastmonth = mktime(0, 0, 0, date("m")-9, date("d"), date("Y"));
this will not work most of the year, if current month is August or less,
the month value will be negative.
Use strtotime('-9 months') instead.
--
PHP General Mailing List (http://www.php.net/)
To u
mktime returns an Unix Timestamp, you need to format it using
date( [form] , <[timestamp]> ).
http://php.net/date
Jeff Oien wrote:
When I do this:
$lastmonth = mktime(0, 0, 0, date("m")-9, date("d"), date("Y"));
echo "$lastmonth";
It prints this:
1056081600
Could you tell me what I'm missing? Tha
When I do this:
$lastmonth = mktime(0, 0, 0, date("m")-9, date("d"), date("Y"));
echo "$lastmonth";
It prints this:
1056081600
Could you tell me what I'm missing? Thanks and thanks for the previous
help.
Jeff Oien
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.
5 matches
Mail list logo