I've got:
String str = "2016-01-05" ;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse(str, formatter);
Now, the variable "date" contains the date "2016-01-05". How do I extract "2016-01" from that date and put it again into the variable "date" ?