title: Check if DateTime is in the future with old version of JodaTime
body: <p>I have a unique situation. I'm working on a legacy project that is on an old WebLogic server that (A) does not allow anything past Java 6, and (B) pollutes the classloader with an old version of JodaTime (version 1.2, to be precise).</p>
  
  <p>The client I'm working for has a Standard Development Platform that includes Java 8, and JodaTime for projects that are stuck in earlier versions of Java.  Therefore, I'm stuck using this old version of JodaTime (310-Backport would be a great solution, but I'm not allowed to use it).</p>
  
  <p>I need to create a utility method that checks if a <code>DateTime</code> is after today (regardless of time). JodaTime 1.2 does not have <code>LocalDate</code>, or convenient static factory methods like <code>now()</code>, so I have come up with this:</p>
  
  <pre><code>public static boolean isAfterToday(DateTime dateTime) {
    YearMonthDay date = new YearMonthDay(dateTime);
    YearMonthDay today = new YearMonthDay();
    return date.isAfter(today);
  }
  </code></pre>
  
  <p>It feels a bit icky because in more recent versions of JodaTime, everything in the <code>YearMonthDay</code> class has been deprecated and replaced with <code>LocalDate</code>, which sadly I can't use. Is there a better way I can do this?  Also, I'm trying to strip the time off the <code>DateTime</code> by converting it to a <code>YearMonthDay</code>... are there any "gotchas" I'm missing or should be aware of?</p>
  
  <p>A couple of additional notes: I'm assuming that I've already null-checked the <code>dateTime</code> argument, and the time zone shouldn't be an issue because all time zones in the application are GMT.  Also, I <em>am</em> allowed to use the Apache Commons and Guava libraries.</p>