So, if $endDate = "2015-02-24", the result I am getting is 5 months, 2 weeks, 0 days. Whereas, the result should be 0 months, 0 weeks, 5 days.
However, if $endDate = "2015-06-16' the result is: 3 months, 3 weeks, 3 days. That is correct.
| [reply] |
I get the correct answer, although it's '4 days 11 hours'. Perhaps you should be using 'today()' instead of 'now()' ?
Also, try to write an example that doesn't use today() or now(), and uses fixed dates, so that the example will behave the same tomorrow.
| [reply] |
Please note, my response is based on today's date (2015-02-19).
| [reply] |