ZF-8110: compareDate extracts false date

Description

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.

$dateValue = new Zend_Date(‚01.01.2010');
$today = new Zend_Date();
$tomorrow = $today->addDay(1);

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

Comments

Example not reproducable as it produces a tokenizer error.

Fixed with r18661