note 55906 deleted from function.date by victor
| From: | victor@php.net | Date: | Wed, 17 Aug 2005 10:05:48 +0000 |
| Subject: | note 55906 deleted from function.date by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-93784@lists.php.net to get a copy of this message | ||
Note Submitter: serban dot nistor at gmail dot com
----
A simple function similar to the "cal -j" UNIX command:
<?php
function getDays() {
$months=Array(31,28,31,30,31,30,31,31,30,31,30,31);
$days=0;
for($i=0;$i<date("n")-1;$i++) $days+=$months[$i];
$days+=date("j");
if(date("L")&&date("n")>=2) $days+=1;
return $days;
}
?>