Skip to content

Instantly share code, notes, and snippets.

@allenrabinovich
Created April 18, 2012 22:52
Show Gist options
  • Save allenrabinovich/2417200 to your computer and use it in GitHub Desktop.
Save allenrabinovich/2417200 to your computer and use it in GitHub Desktop.
var mydate = new Date(); // Today's date
var myday = mydate.getDate() + ''; // String corresponding to today's day-of-the-month
var mymonth = mydate.getMonth() + ''; // String corresponding to today's date's month
var myyear = mydate.getFullYear() + ''; // String corresponding to today's date's year
var rules = {};
rules[myyear] = {};
rules[myyear][mymonth] = {};
rules[myyear][mymonth]["1-" + myday] = "myDisabledDatesRule";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment