Changeset 7931 for sandbox/webservice/api/rest/admin/CommonFunctions.php
- Timestamp:
- 03/01/13 10:11:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/webservice/api/rest/admin/CommonFunctions.php
r7882 r7931 14 14 15 15 return str_replace( $array1, $array2, $param); 16 } 17 18 public function mascaraBirthDate($param) 19 { 20 $bDate = trim(preg_replace("/[^0-9]/", "", $param)); 21 22 $bDate = preg_replace('/(\d{2})(\d{2})(\d{4})/','$1/$2/$3',$bDate); 23 24 if( preg_match("#/#", $bDate) === 1 ) 25 $strDate = implode("-",array_reverse(explode('/',$bDate))); 26 27 return $strDate; 16 28 } 17 29
Note: See TracChangeset
for help on using the changeset viewer.