[thelist] Looping Time Ranges
Ian Potts
ian at ianpotts.com
Tue Jun 24 14:08:03 CDT 2003
I must not have had enough caffeine today as I know I am missing
something obvious. I have several ranges of times in epoch format that I
need to do several things with. These are unique ranges, beginning and
ending in the same month.
Example:
1056114228-1056217828
1056430800-1056517199
I need to first create a structure containing the days of the month
encompassed by the ranges (example: 1,2,3,4,5...) Then I need to set the
value of each of these days to the amount of time (in seconds) that the
range spanned in that day.
So the structure with the days is easy. I convert from epoch to
coldfusion dates, loop through from #day(start)# to #day(end)#. Any
suggestion on how to loop through each range and determine the time
running for each day?
First thought was to loop by 86400 (1 day) however the range may not
start at the beginning of the day, and may not end at the midnight.
Thanks in advance!
Ian
More information about the thelist
mailing list