In a C# / WPF application I have a list of type string that is the ItemsSource of a combobox. This list contains half-hour chunks of time that are free on the user's calendar for the current day (from 8am to 5pm). Pictured here:
I would like to trim the list so that times in the past are not shown (e.g. If it's presently 10am, don't show chunks of time from 8am-10am). How can I best accomplish this?
Update: The list of strings is composed of "startTime" + " - " + "endTime", so each entry in the list looks like:
6/10/2014 8:00:00 AM - 6/10/2014 8:30:00 AM
6/10/2014 8:30:00 AM - 6/10/2014 9:00:00 AM
etc...