downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DateInterval::format> <DateInterval::__construct
Last updated: Fri, 14 Aug 2009

view this page in

DateInterval::createFromDateString

(PHP 5 >= 5.3.0)

DateInterval::createFromDateStringConfigure un objet DateInterval à partir des parties d'une chaîne

Description

public static DateInterval DateInterval::createFromDateString ( string $time )

Utilise les analyseurs de dates natifs et configure un objet DateInterval à partir d'une chaîne de caractères.

Liste de paramètres

time

Une date, avec des portions relatives.

Valeurs de retour

Retourne un nouvel objet DateInterval, en cas de succès.



add a note add a note User Contributed Notes
DateInterval::createFromDateString
Anonymous
28-Sep-2009 07:02
DateInterval::createFromDateString ( string $time )

When the manual says "Uses the normal date parsers" it means that this function cannot take $time = ISO8601 strings like "P7D".  If you want to use those, you must use the constructor.

DateInterval::format> <DateInterval::__construct
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites