示例#1
0
 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;
     }
 }
示例#2
0
function parse_calendardate($local_format)
{
    return Vtiger_Functions::currentUserJSDateFormat($local_format);
}