public static function between($form, $cndArray) { $val = self::getValue($form, $cndArray['fieldname']); $dates = explode(',', $cndArray['val']); list($startDate, $endDate) = $dates; $format = Vtiger_Functions::currentUserJSDateFormat($val); $format = str_replace('%', "", $format); $startDate = DateTime::createFromFormat('Y-m-d', $startDate); $endDate = DateTime::createFromFormat('Y-m-d', $endDate); $testDate = DateTime::createFromFormat($format, $val); if ($testDate >= $startDate && $testDate <= $endDate) { return TRUE; } else { return FALSE; } }
function parse_calendardate($local_format) { return Vtiger_Functions::currentUserJSDateFormat($local_format); }