summaryrefslogtreecommitdiffstats
path: root/system/helpers/date_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/date_helper.php')
-rw-r--r--system/helpers/date_helper.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 56e5c46aa..73fd8086e 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -278,6 +278,11 @@ if ( ! function_exists('days_in_month'))
$year = date('Y');
}
+ if (defined('CAL_GREGORIAN'))
+ {
+ return cal_days_in_month(CAL_GREGORIAN, $month, $year);
+ }
+
if ($year >= 1970)
{
return (int) date('t', mktime(12, 0, 0, $month, 1, $year));