Re: Add __toString() to DateInterval

From: Date: Tue, 16 Mar 2021 11:47:51 +0000
Subject: Re: Add __toString() to DateInterval
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-113559@lists.php.net to get a copy of this message
On Mon, 15 Mar 2021, Moritz Friedrich wrote:

> I would assume the moment I call some kind of ISO conversion or 
> serialization method on a dynamic interval, I’d receive output 
> relative to now. createFromDateString creates the interval relative 
> to now, so why shouldn’t 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 
every interval as encoded in a DateInterval object through an ISO 
interval string, so we shouldn't attempt to do that.

cheers,
Derick


-- 
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


Thread (19 messages)

« previous php.internals (#113559) next »