title: Parsing a year String to a LocalDate with Java8
body: <p>With Joda library, you can do</p>
  
  <pre><code>DateTimeFormat.forPattern("yyyy").parseLocalDate("2008")
  </code></pre>
  
  <p>that creates a LocalDate at Jan 1st, 2008</p>
  
  <p>With Java8, you can try to do</p>
  
  <pre><code>LocalDate.parse("2008",DateTimeFormatter.ofPattern("yyyy"))
  </code></pre>
  
  <p>but that fails to parse:</p>
  
  <pre><code>Text '2008' could not be parsed: Unable to obtain LocalDate from TemporalAccessor: {Year=2008},ISO of type java.time.format.Parsed
  </code></pre>
  
  <p>Is there any alternative, instead of specifically writing sth like</p>
  
  <pre><code>LocalDate.ofYearDay(Integer.valueOf("2008"), 1)
  </code></pre>
  
  <p>?</p>