Re: DateTime object equality
| From: | Michael Wallner | Date: | Mon, 05 Mar 2007 13:51:03 +0000 |
| Subject: | Re: DateTime object equality | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28243@lists.php.net to get a copy of this message | ||
Michael Wallner wrote:
> Hans Lellelid wrote:
>
>> Is this DateTime comparison behavior actually intended to be different
>> from everything else? If there's some reason that DateTime object
>> properties cannot be compared to each other, wouldn't it be more
>> appropriate for them to always return FALSE ?
>
> In my POV this is easily solvable with a custom comparison object handler.
> See attached patch. I also think that comparing to Datetime instances should
> give a reasonable result.
>
> Regards,
--
Michael