I'm working with a collection of DateTime with all dates from Date A to Date B. I will be handed a string which looks like 1234567, 1 is sunday, 2 is tuesday, etc.
Now, imagine I want to filter my dates collection using a string with the above configuration and we get the string 1004007, meaning we will have to filter our DateTime collection to only have dates which occur on a sunday, on a wednesday and a saturday.
How can I read the whole string, figure out which days I will be filtering from and then dynamically filter my collection according to those days of the week?