How can I check if current day is working day
<p>I have application that needs to be run on working days, and within working hours.</p>

<p>In application configuration, I've set start time in format </p>

<pre><code>Monday-Friday
9:00AM-5:30PM
</code></pre>

<p>Now, I have a problem how to check if current day is within day boundare is (for the time is easy - parse time with <code>DateTime.ParseExact</code> and simple branch will do), but I don't know how to parse days.</p>

<p>I've tried with:</p>

<pre><code>DayOfWeek day = DateTime.Now.DayOfWeek;
if (day &gt;= (DayOfWeek)Enum.Parse(typeof(DayOfWeek), sr.start_day) &amp;&amp;
    day &lt;= (DayOfWeek)Enum.Parse(typeof(DayOfWeek), sr.end_day))
{ /* OK */ }
</code></pre>

<p><code>sr.start_day</code> and <code>sr.end_day</code> are strings</p>

<p>but the problem occurred during weekend testing - apparently, in <code>DayOfWeek</code> <code>enum</code>, Sunday is first day of the week (refering to the comments on <a href="http://msdn.microsoft.com/en-us/library/system.dayofweek.aspx" rel="nofollow" title="MSDN">MSDN page</a></p>

<p>I suppose I could do some gymnastics with current code, but I am looking for the most readable code available.</p>

<p><strong>Edit</strong>
Sorry for the misunderstanding - working days are not from Monday to Friday - they are defined as strings in config file, and they can be even from Friday to Saturday - which breaks my original code.</p>
