fuel/fuel/core/classes/date.php
public static function create_from_string($input, $pattern_key = 'local')
	{
		\Config::load('date', 'date');

		$pattern = \Config::get('date.patterns.'.$pattern_key, null);
		empty($pattern) and $pattern = $pattern_key;

		$time = strptime($input, $pattern);
		if ($time === false)
		{
			throw new \UnexpectedValueException('Input was not recognized by pattern.');
		}

		// convert it into a timestamp
		$timestamp = mktime($time['tm_hour'], $time['tm_min'], $time['tm_sec'],
						$time['tm_mon'] + 1, $time['tm_mday'], $time['tm_year'] + 1900);

		if ($timestamp === false)
		{
			throw new \OutOfBoundsException('Input was invalid.'.(PHP_INT_SIZE == 4?' A 32-bit system only supports dates between 1901 and 2038.':''));
		}

		return static::forge($timestamp);
	}
public static function create_from_string($input, $pattern_key = 'local')
	{
		\Config::load('date', 'date');

		$pattern = \Config::get('date.patterns.'.$pattern_key, null);
		empty($pattern) and $pattern = $pattern_key;

		$time = strptime($input, $pattern);
		if ($time === false)
		{
			throw new \UnexpectedValueException('Input was not recognized by pattern.');
		}

		// convert it into a timestamp
		$timestamp = mktime($time['tm_hour'], $time['tm_min'], $time['tm_sec'],
						$time['tm_mon'] + 1, $time['tm_mday'], $time['tm_year'] + 1900);

		if ($timestamp === false)
		{
			throw new \OutOfBoundsException('Input was invalid.'.(PHP_INT_SIZE == 4?' A 32-bit system only supports dates between 1901 and 2038.':''));
		}

		return static::forge($timestamp);
	}
public static function create_from_string ( $ input , $ pattern_key = 'local' ) { \ Config :: load ( 'date' , 'date' ) ; $ pattern = \ Config :: get ( 'date.patterns.' . $ pattern_key , null ) ; empty ( $ pattern ) and $ pattern = $ pattern_key ; $ time = strptime ( $ input , $ pattern ) ; if ( $ time === false ) { throw new \ UnexpectedValueException ( 'Input was not recognized by pattern.' ) ; } // convert it into a timestamp $ timestamp = mktime ( $ time [ 'tm_hour' ] , $ time [ 'tm_min' ] , $ time [ 'tm_sec' ] , $ time [ 'tm_mon' ] + 1 , $ time [ 'tm_mday' ] , $ time [ 'tm_year' ] + 1900 ) ; if ( $ timestamp === false ) { throw new \ OutOfBoundsException ( 'Input was invalid.' . ( PHP_INT_SIZE == 4 ? ' A 32-bit system only supports dates between 1901 and 2038.' : '' ) ) ; } return static :: forge ( $ timestamp ) ; }
Uses the date config file to translate string input to timestamp

@param   string  date/time input
@param   string  key name of pattern in config file
@return  Date
Uses the date config file to translate string input to timestamp