Ignore:
Timestamp:
Aug 30, 2003, 5:54:37 PM (21 years ago)
Author:
z0rglub
Message:

Multi categories for the same picture

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r57 r61  
    350350  }
    351351}
     352
     353function 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}
    352378?>
Note: See TracChangeset for help on using the changeset viewer.