Changeset 4430
- Timestamp:
- 05/17/11 15:29:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.0.1/expressoMail1_2/inc/class.imap_functions.inc.php
r4252 r4430 3418 3418 } 3419 3419 3420 function make_search_date($date){ 3421 3422 $months = array( 3423 1 => 'jan', 3424 2 => 'feb', 3425 3 => 'mar', 3426 4 => 'apr', 3427 5 => 'may', 3428 6 => 'jun', 3429 7 => 'jul', 3430 8 => 'aug', 3431 9 => 'sep', 3432 10 => 'oct', 3433 11 => 'nov', 3434 12 => 'dec' 3435 ); 3420 function make_search_date($date,$before = false){ 3421 3436 3422 3437 3423 //TODO: Adaptar a data de acordo com o locale do sistema. 3438 3424 list($day,$month,$year) = explode("/", $date); 3439 $search_date = $day."-".$months[intval($month)]."-".$year; 3425 $before?$day=(int)$day+1:$day=(int)$day; 3426 $timestamp = mktime(0,0,0,(int)$month,$day,(int)$year); 3427 $search_date = date('d-M-Y',$timestamp); 3440 3428 return $search_date; 3441 3429 … … 3481 3469 { 3482 3470 $filter .= '"'.$filter_array[1].'"'; 3483 } 3484 else 3471 }else if(trim($filter_array[0]) == 'BEFORE' ) 3485 3472 { 3486 $filter .= '"'.$this->make_search_date($filter_array[1]).'"'; 3487 } 3473 $filter .= '"'.$this->make_search_date($filter_array[1],true).'"'; 3474 }else{ 3475 $filter .= '"'.$this->make_search_date($filter_array[1]).'"'; 3476 } 3488 3477 } 3489 3478 }
Note: See TracChangeset
for help on using the changeset viewer.