title: SimpleDateFormat problems with 2 year date
body: <p>I'm trying to understand two things:</p>
  
  <ol>
  <li>Why doesn't the following code throw an exception (since the <code>SimpleDateFormat</code> is not lenient)</li>
  <li>It doesn't throw an exception, but why is it parsing the year as 0013 (instead of <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html#year" rel="noreferrer" title="here">using the rules here</a> the +80:-20 years from today rule)</li>
  </ol>
  
  <p>Here's the code</p>
  
  <pre><code>import java.text.SimpleDateFormat;
  import java.util.Calendar;
  import java.util.Date;
  
  public class TestDate {
      public static void main(String[] args) throws Exception {
          SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
          format.setLenient(false);
          Date date = format.parse("01/01/13"); // Since this only has a 2 digit year, I would expect an exception to be thrown
  
          System.out.println(date); // Prints Sun Jan 01 00:00:00 GMT 13
  
          Calendar cal = Calendar.getInstance();
          cal.setTime(date);
  
          System.out.println(cal.get(Calendar.YEAR)); // Prints 13
      }
  }
  </code></pre>
  
  <p>If it makes a difference, I'm using java 1.6.0_38-b05 on Ubuntu</p>