note 81974 deleted from function.date by danbrown

From: Date: Sun, 20 Jul 2008 02:45:20 +0000
Subject: note 81974 deleted from function.date by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141982@lists.php.net to get a copy of this message
Note Submitter: boyfilhote at yahoo dot com dot br ---- Find out how many days a month has (including leap-years) in one single line command: $numberOfDays = date("d", mktime(0, 0, 0, $month + 1, 0, $year)); This is possible because if you set the field "day" as ZERO in MKTIME, it will consider the last day of month-1.

« previous php.notes (#141982) next »