I know it is very crazy, but I am still asking for your solution.
Now, I have two dates: let say start date: 2017-02-01 and end date: 2017-04-01.
If I compare the end date with the start date, of course I would get 60 days (includes one day of 2017-02-01 for itself).
Assume I don't know what month and how many days do the months have between these 2 dates. Erm...is there anyway to determine the days and month... clearly?
Something like this:
- 2017-02-01 => 2017-02-28 = 28 days AND this is February
- 2017-03-01 => 2017-03-31 = 31 days AND this is March
- 2017-04-01 => 2017-04-01 = 1 day AND this is April
I could only find the days between two dates in PHP, and of course it is easier than this one. I think this one already covers the array concept, and already beyond my IQ XD.
I need your help, prove yourselves by this solving this question, thank you so much! Much appreciated.
In simpler: What I wanted to find is -- I don't want to find the day between two dates, I wanna find what month and how many days for each month between these two dates.
P/S: I don't have any code for this, because I don't even know how to start to code this.