I’d like to check if to Zend_Date datetimes are on the same day. How can I do that?
$date1 = new Zend_Date('2011-11-14 10:45:00');
$date2 = new Zend_Date('2011-11-14 19:15:00');
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Also see the chapter on Comparing Dates with Zend Date
On a sidenote, I strongly encourage you to verify if you have the need for
Zend_Date. Do not use it just because it is part of ZF. Most of whatZend_Datedoes can be achieved faster and more comfortably with nativeDateTimeas well:EDIT after comments
If you want to compare whether it’s the same date just do