ZF-8110: compareDate extracts false date

Issue Type: Bug Created: 2009-10-20T22:31:48.000+0000 Last Updated: 2009-10-21T12:06:04.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Stimmer Martin (mstimmer) Assignee: Thomas Weidner (thomas) Tags: - Zend_Date

Related issues: Attachments:


We´d like to compare two dates with Zend_Date method compareDate. compareDate calls the _date method. This method extracts a date with the format ‚d.M.Y' when an instance of Zend_Date is given. The problem is, this extraction makes for the overgiven date 01.01.2010 the date 1.1.2009.

<pre class="literal">
$dateValue = new Zend_Date(‚01.01.2010');
$today = new Zend_Date();
$tomorrow = $today->addDay(1);

$tomorrow->compareDate($dateValue)  // results 1, when -1 expected


Posted by Thomas Weidner (thomas) on 2009-10-21T11:50:01.000+0000

Example not reproducable as it produces a tokenizer error.

Posted by Thomas Weidner (thomas) on 2009-10-21T12:06:03.000+0000

Fixed with r18661

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.