Changeset 61 for trunk/include/functions.inc.php
- Timestamp:
- Aug 30, 2003, 5:54:37 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions.inc.php
r57 r61 350 350 } 351 351 } 352 353 function format_date( $date, $type = 'us', $show_time = false ) 354 { 355 global $lang; 356 357 switch ( $type ) 358 { 359 case 'us' : 360 list( $year,$month,$day ) = explode( '-', $date ); 361 $unixdate = mktime(0,0,0,$month,$day,$year); 362 break; 363 case 'unix' : 364 $unixdate = $date; 365 break; 366 } 367 $formated_date = $lang['day'][date( "w", $unixdate )]; 368 $formated_date.= date( " j ", $unixdate ); 369 $formated_date.= $lang['month'][date( "n", $unixdate )]; 370 $formated_date.= date( ' Y', $unixdate ); 371 if ( $show_time ) 372 { 373 $formated_date.= date( ' G:i', $unixdate ); 374 } 375 376 return $formated_date; 377 } 352 378 ?>
Note: See TracChangeset
for help on using the changeset viewer.