note 116750 added to dateinterval.construct
| From: | admin at torntech dot com | Date: | Sun, 22 Feb 2015 21:22:18 +0000 |
| Subject: | note 116750 added to dateinterval.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201786@lists.php.net to get a copy of this message | ||
Warning - despite the $interval_spec accepting the ISO 8601 specification format, it does not accept
decimal fraction values with period or comma as stated in the specification.
https://bugs.php.net/bug.php?id=53831
<?php
/* Example from ISO 8601 documentation */
$interval = new DateInterval('P0.5Y');
?>
Will result in
Fatal error: Uncaught exception 'Exception' with message
'DateInterval::__construct(): Unknown or bad format (P0.5Y)'
----
Server IP: 72.52.91.14
Probable Submitter: 73.53.146.202
----
Manual Page -- http://php.net/manual/en/dateinterval.construct.php
Edit -- https://master.php.net/note/edit/116750
Del: integrated -- https://master.php.net/note/delete/116750/integrated
Del: useless -- https://master.php.net/note/delete/116750/useless
Del: bad code -- https://master.php.net/note/delete/116750/bad+code
Del: spam -- https://master.php.net/note/delete/116750/spam
Del: non-english -- https://master.php.net/note/delete/116750/non-english
Del: in docs -- https://master.php.net/note/delete/116750/in+docs
Del: other reasons-- https://master.php.net/note/delete/116750
Reject -- https://master.php.net/note/reject/116750
Search -- https://master.php.net/manage/user-notes.php