Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Zend_Date sub() behaviour on bisect years. #681

Open
valugi opened this issue Mar 18, 2016 · 2 comments
Open

Zend_Date sub() behaviour on bisect years. #681

valugi opened this issue Mar 18, 2016 · 2 comments

Comments

@valugi
Copy link

valugi commented Mar 18, 2016

I am no sure this is a bug or what is the correct behavior, but I was expecting 28th of February more than 1st of March.

$date = new Zend_Date('2016-02-29', 'yyyy-MM-dd');
$date->sub(1, Zend_Date::YEAR); // Mar 1, 2015 12:00:00 AM
@froschdesign
Copy link
Member

This is a bug, but the Zend_Date is error-prone and a fat code monster. I see no chance to fix the problem.

@valugi
Copy link
Author

valugi commented Mar 30, 2016

@froschdesign I love the optimism :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants