RE: [PHP] LAST DAY OF MONTH

From: Date: Fri, 15 Aug 2003 08:57:22 +0000
Subject: RE: [PHP] LAST DAY OF MONTH
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-159658@lists.php.net to get a copy of this message
play with mktime to get the months that you want. the code snippet below is for July 2003: --- start code --- <? $xMonths = mktime (0,0,0, date("m")-1,1,date("Y")); print "total days in ".date("M",$xMonths)." = ".date("t",$xMonths)."<BR>"; print "and that WAS on ".date("D",$xMonths); ?> --- end code --- rgds. Quoting Ralph Guzman <ralph@nqionline.com>: > wow. I missed that one in the manual. I guess it's time for me to call > it a night. > > Thanks. > > > -----Original Message----- > From: Sn!per [mailto:sniper@home.net.my] > Sent: Friday, August 15, 2003 1:21 AM > To: Ralph Guzman > Cc: PHP General Mailing List > Subject: Re: [PHP] LAST DAY OF MONTH > > <? print date("t") ?> > > rgds. > > > Quoting Ralph Guzman <ralph@nqionline.com>: > > > How can I get the last day for the current month? > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > --------------------------------------------------- > Sign Up for free Email at http://ureg.home.net.my/ > --------------------------------------------------- > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --------------------------------------------------- Sign Up for free Email at http://ureg.home.net.my/ ---------------------------------------------------

« previous php.general (#159658) next »