note 59732 deleted from function.date by derick
| From: | derick@php.net | Date: | Sun, 15 Jan 2006 12:36:06 +0000 |
| Subject: | note 59732 deleted from function.date by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-101808@lists.php.net to get a copy of this message | ||
Note Submitter: admin at epark dot pl
----
here a little two functions for rewind the month in for example calendar
I couldn't find it anywhere, maybe sombody need it
peace :)
function next_month($m, $y)
{
if ($m%12==0)
{
$mi_n=$m-11;
$ye_n=$y+01;
}
else
{
$mi_n=$m+1;
$ye_n=$y;
}
return $m;
return $y;
}
function previous_month($m,$y)
{
if (($m-1)%12==0)
{
$mi_p=$m+11;
$ye_p=$y-01;
}
else
{
$mi_p=$m-1;
$ye_p=$y;
}
return $m;
return $y;
}