title: Javascript setting Date to previous year from the current year
body: <p>i want to show jquery calendar dates from 1st september 2010 to current date. </p>
  
  <p>for example</p>
  
  <p>consider if i am spooling a report on 12th january 2011 ,i should allow jquery calendar selection from 1st september 2010 to 12th janyary 2011 .My question is  how to set the date to 1st sep 2010 from current date (if current date is january 11th 2011) i.e next year. I want to get the date from the server and set in the javascript.</p>
  
  <p>Currently i get the minimum  date from serverside java like this</p>
  
  <pre><code>minDate = new Date();                           // timestamp now
  Calendar cal = Calendar.getInstance();          // get calendar instance
  cal.setTime(minDate);                           // set cal to date
  cal.set(2010,cal.SEPTEMBER,1);
  minDate = cal.getTime();
  </code></pre>
  
  <p>the output would be 20100901</p>
  
  <p>but i dont want to hardcode 2010 in the code , i want a generic code that takes 1st sep 2010   as minimum even when i execute on january 2011.</p>