title: Comparing two dates without taking time into account
body: <p>I have two dates like this, I would like to compare only the dates, ignoring the time. Currently I have this:</p>
  
  <pre><code>package main
  
  import (
      "time"
      //"fmt"
  )
  
  func main() {
      a, _ := time.Parse(time.RFC3339, "2017-02-01T12:00:00+00:00")
      b, _ := time.Parse(time.RFC3339, "2017-02-11T14:30:00+00:00")
  
      x := b.Sub(a)
  
      println(int(x.Hours()))
  }
  </code></pre>
  
  <p>Which prints <code>242</code>. That is correct, but what I actually want to do is compare the dates like this:</p>
  
  <pre><code>    a, _ := time.Parse(time.RFC3339, "2017-02-01T00:00:00+00:00")
      b, _ := time.Parse(time.RFC3339, "2017-02-11T00:00:00+00:00")
  </code></pre>
  
  <p>Notice: minutes/hours/seconds have been set to zero - the diff will now be 240 hours. </p>
  
  <p>I couldn't really figure out how to do this, is there a <code>time.SetTime(0, 0, 0)</code> function in Go that I missed or what's the canonical way to reset the time for a date? </p>