Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113559 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40298 invoked from network); 16 Mar 2021 11:54:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Mar 2021 11:54:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 800331804D0 for ; Tue, 16 Mar 2021 04:47:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Tue, 16 Mar 2021 04:47:52 -0700 (PDT) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id E7DD410C030; Tue, 16 Mar 2021 11:47:50 +0000 (GMT) Date: Tue, 16 Mar 2021 11:47:51 +0000 (GMT) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Moritz Friedrich cc: internals@lists.php.net In-Reply-To: Message-ID: References: User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-1194933906-1615895271=:2842" Subject: Re: [PHP-DEV] Add __toString() to DateInterval From: derick@php.net (Derick Rethans) --8323329-1194933906-1615895271=:2842 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 15 Mar 2021, Moritz Friedrich wrote: > I would assume the moment I call some kind of ISO conversion or=20 > serialization method on a dynamic interval, I=E2=80=99d receive output=20 > relative to now. `createFromDateString` creates the interval relative=20 > to now, so why shouldn=E2=80=99t the reverse hold true? Please don't post top replies. I also don't understand what you're trying to say. You can't round trip=20 every interval as encoded in a DateInterval object through an ISO=20 interval string, so we shouldn't attempt to do that. cheers, Derick --=20 PHP 7.4 Release Manager Host of PHP Internals News: https://phpinternals.news Like Xdebug? Consider supporting me: https://xdebug.org/support https://derickrethans.nl | https://xdebug.org | https://dram.io twitter: @derickr and @xdebug --8323329-1194933906-1615895271=:2842--