title: Java Date.before working but Date.after not working
body: <p>I'm writing a program that tests to see if a date falls between two certain dates. So if a date falls between January 25, 1868 and July 30, 1912, it is in the Meiji Era, and so on. My test value is September 8th, 1868 and my ranges are January 25, 1868 and July 30, 1912. So when I run the program only "bye" is printed.</p>
  
  <pre><code>        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
  
          Date meijiStart = sdf.parse("1868-01-25");
          Date meijiEnd = sdf.parse("1912-07-30");
          Date Test = sdf.parse("1868-09-08");
  
          Date taishoStart = sdf.parse("1912-08-01");
          Date taishoEnd = sdf.parse("1926-12-25");
  
          Date showaStart = sdf.parse("1926-12-26");
          Date showaEnd = sdf.parse("1989-01-07");
  
          Date heiseiStart = sdf.parse("1989-01-08");
          Date heiseiEnd = sdf.parse("2015-10-30");
  
  
          if (Test.after(meijiStart))
          {
  
              System.out.println("hi");
          }   
  
         if (Test.before(meijiEnd))
          {
              System.out.println("bye");
          }
      } catch (ParseException ex)
      {
  
          ex.printStackTrace();
      }
  
  }
  </code></pre>
  
  <p>}</p>