lib/DateTime.php
public static function getFormat($format=null)
	{
		// use default format if no format specified
		if (!$format)
			$format = self::$DEFAULT_FORMAT;

		// format is a friendly
		if (array_key_exists($format, self::$FORMATS))
			 return self::$FORMATS[$format];

		// raw format
		return $format;
	}
public static function getFormat($format=null)
	{
		// use default format if no format specified
		if (!$format)
			$format = self::$DEFAULT_FORMAT;

		// format is a friendly
		if (array_key_exists($format, self::$FORMATS))
			 return self::$FORMATS[$format];

		// raw format
		return $format;
	}
public static function getFormat ( $ format = null ) { // use default format if no format specified if ( ! $ format ) $ format = self :: $ DEFAULT_FORMAT ; // format is a friendly if ( array_key_exists ( $ format , self :: $ FORMATS ) ) return self :: $ FORMATS [ $ format ] ; // raw format return $ format ; }
Returns the format string.

If $format is a pre-defined format in $FORMATS it will return that otherwise
it will assume $format is a format string itself.

@see FORMATS
@param string $format A pre-defined string format or a raw format string
@return string a format string
Returns the format string .