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::createFromDateString
(PHP 5 >= 5.3.0)
DateInterval::createFromDateString — 相対指定文字列から DateInterval を作成する
説明
通常の日付パーサを用いて、パースされた相対指定文字列から DateInterval を設定します。
パラメータ
- time
-
相対部分を含む日付。
返り値
成功した場合に、新しい DateInterval のインスタンスを返します。
DateInterval::createFromDateString
Anonymous
29-Sep-2009 04:02
29-Sep-2009 04:02
