Hi people;
Does anybody have an idea how to tackle this problem.
I will have a date range i.e. 17/07/2006 - 10/08/2006.
What I would like to be able to do it work out many days are in July from that range and how many are in August.
Anybody have any idea?
Thanks.
Date Ranges
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
- Break the two dates apart into their components.
- use range() to create an array of the months to calculate on
- looping over the array from range(), use date() to pull how many days are in that month
- for the first month, subtract the day number from the components.
- for the last month, replace the number of days in the month with the day number from the components.
-
b00ker_b0y
- Forum Newbie
- Posts: 10
- Joined: Thu Jun 22, 2006 7:16 am