fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Date::create_from_string Multi Format #868

Closed maitrepylos closed 12 years ago

maitrepylos commented 12 years ago

Hello, it would be possible to have the possibility of creating a date following a predefined format, little as Datetime

[code]

/* Date::create_from_string($input,$format, $pattern_key) */

Date::create_from_string("01/04/2011","d/m/Y"); //April 1st, 2011

[/code]

Thanks

jschreuder commented 12 years ago

That is already possible: http://docs.fuelphp.com/classes/date.html#/method_create_from_string - though the documentation lacks the point that you can also directly input a pattern (a strftime() pattern).