/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//date functions function addZero($n, $zeroes = 1) { $n = "0" . $n; if($zeroes > 1) return addZero($n, $zeroes - 1); else return $n; } function getPrevMonth($m) { $r = $m - 1; if($r == 0) $r = 12; return addZero($r); } function getNextMonth($m) { $r = $m + 1; if($r == 13) $r = 1; return addZero($r); } function getMonthYearTimestamp($m, $y) { }