[source language=’php’]
function _isDateActive($date_from, $date_to)
{
$ar_DateFrom = explode(‘.’, $date_from);
$ar_DateTo = explode(‘.’, $date_to);
$ar_Date = explode(‘.’, date(‘d.m.Y’));
$s_MetaDateFrom = mktime(0, 0, 0, $ar_DateFrom[1], $ar_DateFrom[0], $ar_DateFrom[2]);
$s_MetaDateTo = mktime(0, 0, 0, $ar_DateTo[1], $ar_DateTo[0], $ar_DateTo[2]);
$s_MetaDate = mktime(0, 0, 0, $ar_Date[1], $ar_Date[0], $ar_Date[2]);
return ($s_MetaDate >= $s_MetaDateFrom && $s_MetaDate <= $s_MetaDateTo); } [/source]