PHP Date calculation

  • Thread starter Thread starter L33
  • Start date Start date

L33

L33

Permabanned
Joined
1 Apr 2003
Posts
1,872
Hi
I'm looking for a way to return how many times a date occours until a specified date / within a specified date range.
i.e: Today is 06/04/2009, and my specified 'end' date is, say, 14/12/2011. I would like to work out how many times the 10th of the month occours between now and then, if that makes any sense?! :p The value I'd be looking for in this instance would be 32 (there are 8 more '10ths' left this year, 12 next, and 12 in 2011).

I realise I could just 'count' the number of months difference, but if for example the date I specified to search for was the 31st, it doesn't occour in all months etc etc.
Would be greatful if anyone could give me any pointers :)
 
Thanks :) I ended up doing pretty much the same thing in the end yesterday, looping each month and totalling the number of days.
 
Back
Top Bottom