This question already has an answer here:
- How do you get a timestamp in JavaScript? 37 answers
- How do I get the current date in JavaScript? 43 answers
I am trying programmatically check if the current time for my web application is between two predefined times. I don't know how to get the current time and then set variables that store two predefined times. The pseudo code would look like this
if(currentTime < shiftStart && currentTime <shiftEnd)
{
shift = 2
}
But how do I declare and setup the variables so the code works correctly.
>
instead of<
? – Ted Hopp Aug 8 '13 at 17:38