title: DateTimeFormatter adding a year to date after formatting
body: <p>I am trying to convert a date of the format <code>2019-12-30</code> to a date with format <code>30-12-2019</code> and for this I thought of using <code>DateTimeFormatter</code> and I have the following code for this:</p>
  
  <pre><code>LocalDate date = LocalDate.parse("2019-12-30");
  DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY");
  System.out.println(formatter.format(date));
  </code></pre>
  
  <p>However, to my surprise, this returns an output:</p>
  
  <pre><code>30-12-2020
  </code></pre>
  
  <p>instead of the expected <code>30-12-2019</code>. If the date is set to <code>2019-11-30</code>, it correctly returns <code>30-11-2019</code>. I am doing something terribly wrong but I am not able to figure out what exactly. Can someone please help?</p>