Hi
I have a table of dates, say:
2009-01-15
2009-01-16
2009-01-17
2009-01-18
2009-01-21
2009-01-22
2009-01-25
2009-01-26
2009-01-27
2009-01-30
I'm trying to write a function that will pull these dates into a rst and then output as:
15-18, 21, 22, 25-27 & 30 January 2009
ie identifying where the consecutive sequences of more than two dates are grouped together.
Has anyone got anything existing that would help me out with this? - am going in circles trying to identify the second and third dates as being in sequence (or not)...
Many thanks
Steve
I have a table of dates, say:
2009-01-15
2009-01-16
2009-01-17
2009-01-18
2009-01-21
2009-01-22
2009-01-25
2009-01-26
2009-01-27
2009-01-30
I'm trying to write a function that will pull these dates into a rst and then output as:
15-18, 21, 22, 25-27 & 30 January 2009
ie identifying where the consecutive sequences of more than two dates are grouped together.
Has anyone got anything existing that would help me out with this? - am going in circles trying to identify the second and third dates as being in sequence (or not)...
Many thanks
Steve