title: How to parse date from string with year and week using java.time
body: <p>In old java I can do it in that way:</p>
  
  <pre><code>System.out.println(new SimpleDateFormat("yyyy w", Locale.UK).parse("2015 1"));
  // shows Mon Dec 29 00:00:00 CET 2014
  
  System.out.println(new SimpleDateFormat("yyyy w", Locale.US).parse("2015 1"));
  // shows Mon Dec 28 00:00:00 CET 2014
  </code></pre>
  
  <p>I would like to use java.time in Java 8.</p>
  
  <pre><code>System.out.println( LocalDate.parse("2015 1", DateTimeFormatter.ofPattern("yyyy w", Locale.US)));
  </code></pre>
  
  <p>Result:</p>
  
  <p>java.time.format.DateTimeParseException: Text '2015 1' could not be parsed: Unable to obtain LocalDate from TemporalAccessor: {WeekOfWeekBasedYear[WeekFields[SUNDAY,1]]=1, Year=2015},ISO of type java.time.format.Parsed</p>
  
  <p>How to do it in java.time?</p>
  
  <p>Moreover, I'm not satisfied that I have to pass Locale to determine first day of week: Monday vs Sunday. It is not country feature but calendar feature. I would like to use something like java.time.temporal.WeekFields.ISO to show the world that week start with Monday</p>
  
  <p>I found similar case : <a href="https://stackoverflow.com/questions/3941700/how-to-get-dates-of-a-week-i-know-week-number">https://stackoverflow.com/questions/3941700/how-to-get-dates-of-a-week-i-know-week-number
  </a></p>
  
  <p>but not for java.time in Java 8. Moreover, solution that first create a date object and later set correct week is not elegant. I want to create final date in one shot.</p>