I have this date as string on client side :
var myDate = "08/08/2012";
how can I know if this date is Saturday or not?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to turn that string into a javascript date and use the
getDay()function which will return a number from 0-6 (Sunday being 0, Monday 1 etc).For the first part of that, you should split up your string and construct a
Dateobject (Im not sure if your date is dd/mm/yyyy or mm/dd/yyyy and the same will happen on client computers so be specific). The easiest way by far is to use a library such as date.js which would allow you to use code such asOne better than that, datejs has some extensions which can make this a one liner: