Changeset 5059 for branches/2.2/filemanager/inc/class.vfs_functions.inc.php
- Timestamp:
- 09/06/11 11:55:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/inc/class.vfs_functions.inc.php
r3924 r5059 134 134 } 135 135 136 function convertDateForm($pDate) 137 { 138 /** 139 * Recebe a data no formato : aaaa-mm-dd 140 * Retorna a data no formato : dd/mm/aaaa 141 **/ 142 143 $cDate = date_parse($pDate); 144 $day = ( strlen($cDate['day']) > 1 ) ? $cDate['day'] : "0".$cDate['day']; 145 $month = ( strlen($cDate['month']) > 1 ) ? $cDate['month'] : "0".$cDate['month']; 146 $year = $cDate['year']; 147 148 return $day."/".$month."/".$year; 149 } 150 136 151 // String format is YYYY-MM-DD HH:MM 137 152 function dateString2timeStamp($string) 138 153 { 139 return mktime($string[11].$string[12], 140 $string[14].$string[15], 141 $string[17].$string[18], 142 $string[5].$string[6], 143 $string[8].$string[9], 144 $string[0].$string[1]. 145 $string[2].$string[3]); 154 /** 155 * Recebe a data no formato : aaaa-mm-dd 156 * Retorna a data no formato : dd/mm/aaaa 157 **/ 158 159 $cDate = date_parse($string); 160 $day = ( strlen($cDate['day']) > 1 ) ? $cDate['day'] : "0".$cDate['day']; 161 $month = ( strlen($cDate['month']) > 1 ) ? $cDate['month'] : "0".$cDate['month']; 162 $year = $cDate['year']; 163 164 return $day."/".$month."/".$year; 146 165 } 147 166
Note: See TracChangeset
for help on using the changeset viewer.