src/Data/Date.php
public static function format($pDate, $pFormat = 'short')
    {
    	switch ($pFormat) {
    		case 'short':
    			return strftime('%x', strtotime($pDate));
    			break;
    		case 'long':
    			return strftime('%x %H:%M', strtotime($pDate));
    			break;
    		case 'full':
    			return strftime('%x %H:%M:%S', strtotime($pDate));
    			break;
    	}

    	throw new Exception("The requested date format is not correct");
    }
public static function format($pDate, $pFormat = 'short')
    {
    	switch ($pFormat) {
    		case 'short':
    			return strftime('%x', strtotime($pDate));
    			break;
    		case 'long':
    			return strftime('%x %H:%M', strtotime($pDate));
    			break;
    		case 'full':
    			return strftime('%x %H:%M:%S', strtotime($pDate));
    			break;
    	}

    	throw new Exception("The requested date format is not correct");
    }
public static function format ( $ pDate , $ pFormat = 'short' ) { switch ( $ pFormat ) { case 'short' : return strftime ( '%x' , strtotime ( $ pDate ) ) ; break ; case 'long' : return strftime ( '%x %H:%M' , strtotime ( $ pDate ) ) ; break ; case 'full' : return strftime ( '%x %H:%M:%S' , strtotime ( $ pDate ) ) ; break ; } throw new Exception ( "The requested date format is not correct" ) ; }
Format the date based on the locale and the requested format.

@param string $pDate
@param string $pFormat
@return string
Format the date based on the locale and the requested format .