Set a variable to specific value in a string with javascript
<p>All of these dates are being shown in a pull down. Like so...</p>

<pre><code>DateString = 11-15-2012:Thursday, November 15, 2012|11-16-2012:Friday, November 16, 2012|11-17-2012:Saturday, November 17, 2012|11-18-2012:Sunday, November 18, 2012|11-19-2012:Monday, November 19, 2012|11-20-2012:Tuesday, November 20, 2012|11-21-2012:Wednesday, November 21, 2012|11-23-2012:Friday, November 23, 2012|11-24-2012:Saturday, November 24, 2012|11-25-2012:Sunday, November 25, 2012|11-26-2012:Monday, November 26, 2012|11-27-2012:Tuesday, November 27, 2012|11-28-2012:Wednesday, November 28, 2012|11-29-2012:Thursday, November 29, 2012|11-30-2012:Friday, November 30, 2012|12-1-2012:Saturday, December 1, 2012|12-2-2012:Sunday, December 2, 2012|12-3-2012:Monday, December 3, 2012|12-4-2012:Tuesday, December 4, 2012|12-5-2012:Wednesday, December 5, 2012| 


    availableDeliveryDates = DateString;
    seperatedDeliveryDates = availableDeliveryDates.split("|");
    deliveryDateOptions='';

for(i in seperatedDeliveryDates ) {
     var delDates = seperatedDeliveryDates[i].split(":");



     deliveryDateOptions += "&lt;option id='selectedDeliveryDate' value=''&gt;&lt;/option&gt;";
    }

var datesToDeliver = "&lt;select name='deliveryDateSelect' id='deliveryDateSelect'&gt;"+deliveryDateOptions+"&lt;/select&gt;";
$('#selectDeliveryDate').html(datesToDeliver);
$('#selectDeliveryDate').trigger("create");
</code></pre>

<p>If the user selects a weekend then the UI changes. How can find out is Saturday or Sunday is selected?? Also the list of dates will start and end on different days depending on on the day that the user selects a date. So I have to be able to find Saturday or Sunday based on the words "Saturday" or "Sunday". I hope this makes sense..</p>
