title: Easiest way to round Date Scale in D3.js
body: <p>I have a date scale in d3 and I'm looking to cap the x.domain()[0] to the first day of the month and x.domain()[1] to the last day of the month. Assume that the data set is something like</p>
  
  <pre><code>data : [
  {date: '2011-12-31', amount: 200},
  {date: '2012-01-01', amount: 100},
  {date: '2012-01-02', amount: 300},
  {date: '2012-01-03', amount: 400},
  {date: '2012-02-01', amount: 400}
  ]
  </code></pre>
  
  <p>Its a contrived example but basically under this scenario cap the domain to the month of January. Looking for an easy d3esque solution.</p>