/ Published in: PHP
Returns the number of days in the month taking leap-years into account.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* returns number of days in the month taking leap-years into account. input month as a number (1=january etc.) and year. eq. echo month_length(2,2004); // days in feb 2004. */ function month_length($month,$year,$scale=0){ if ($month==2){ } return $monthdays[$month]; }