title: Date issues in jquery ajax
body: <p>Hi i done date format in jquery ajax. i got the value from database and i converted the dateformat as dd-MM-YYYY. now the problem is, <strong>i m getting the previous month</strong>. Ex:database value is 2015-04-02, after converting dateformat i got 02-03-2015. Kindly help me. My coding is.</p>
  
  <pre><code>var pcd_date = new Date(data.pcd_date),
  yr = pcd_date.getFullYear(),
  month = +pcd_date.getMonth() &lt; 10 ? '0' + pcd_date.getMonth() : pcd_date.getMonth() ,
  day = +pcd_date.getDate() &lt; 10 ? '0' + pcd_date.getDate() : pcd_date.getDate(),
  pcddate = day + '-' + month + '-' + yr;
  </code></pre>