JavaScript Date Function

Posted by Darren Cook on Stack Overflow See other posts from Stack Overflow or by Darren Cook
Published on 2010-03-20T10:36:57Z Indexed on 2010/03/20 10:41 UTC
Read the original article Hit count: 188

Filed under:

Hi, I'm using the following function that changes a calendar selection at a set time during the day (all code works perfectly). However, I'd like to modify it slightly so that on a SATURDAY the dd=dd+1 becomes dd=dd+2, because I want to skip Sunday. Can anyone help?

$(function() {       
var dd = 0
if (<%= currentHour %> > <%= cutoffHour %>) {
dd = dd + 1; // go one day in the future
}

© Stack Overflow or respective owner

Related posts about JavaScript