note 104427 modified in function.cal-days-in-month by danbrown
| From: | danbrown@php.net | Date: | Wed, 15 Jun 2011 16:51:09 +0000 |
| Subject: | note 104427 modified in function.cal-days-in-month by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-180561@lists.php.net to get a copy of this message | ||
Forgot to compile the calendar plugin in... Wrote a workaround while I waited for it to compile. It
only supports the Gregorian calendar.
<?php
if (!function_exists('cal_days_in_month'))
{
function cal_days_in_month($calendar, $month, $year)
{
return date('t', mktime(0, 0, 0, $month, 1, $year));
}
}
if (!defined('CAL_GREGORIAN'))
define('CAL_GREGORIAN', 1);
?>
--was--
Forgot to compile the calendar plugin in... Wrote a workaround while I waited for it to compile. It
only supports the Gregorian calendar.
if (!function_exists('cal_days_in_month'))
{
function cal_days_in_month($calendar, $month, $year)
{
return date('t', mktime(0, 0, 0, $month, 1, $year));
}
}
if (!defined('CAL_GREGORIAN'))
define('CAL_GREGORIAN', 1);
http://php.net/manual/en/function.cal-days-in-month.php