title: Get Date() object with specific time
body: <p>I want to get week Start Date of a week. I am able to get the date, its just that the date returned has time wrt to the current system time. For example, if its 19:20 hours right now, I am getting the week start date as <strong>Date {Mon Mar 26 2012 19:20:16 GMT+0530 (IST)}</strong></p>
  
  <p>For accurate calculations, I need the time to be 00:00:00 GMT. </p>
  
  <p>How can I achieve that? </p>
  
  <p>My current code looks like this: </p>
  
  <pre><code>var tDate = new Date();
  var wDate = new Date();
  
  this.chosenDayIndex = this.currentDayIndex = tDate.getDay();
  
  if (this.currentDate == '') {
  
      this.currentDate = new Date();  
      var today = formatDate(tDate);
      var diff = tDate.getDate() - this.currentDayIndex + (this.currentDayIndex == 0 ? -6:1);
  
      this.weekStartDate = this.weekMonDate = new Date(wDate.setDate(diff));
      this.weekEndDate = new Date(this.weekStartDate.getFullYear(),this.weekStartDate.getMonth(), this.weekStartDate.getDate()+6);
      this.weekMonday = formatDate(this.weekMonDate);             
  
  }
  </code></pre>
  
  <p>this.weekStartDate is currently handing out the false start date with the current timestamp.</p>