I am afraid, I still do not quite understand that string. You explained that it is the 49 combinations of start and end dates. Did you mean the combinations of start and end dates of any week in a calendar year? If so, how would the day off be represented differently to the work days in this matrix? How I understand it at the moment is that the numbers, represent the day of the week, sunday being 0, Mon=1, Tue=2...upto Sat=6. And if that was correct, then the first combination in the original string (0012345) doesn't make sense to me because sunday and monday are represented by a 0.
I also tried to work backwards using the 1st line you provided and relating 0123455 of a 6 day week with fridays off to 0012345 for sat-sun off, to understand how to build the rest of the string but I could not. I'm still lost, please help
Many Thanks.