How do I parse YYYY-MM-DD dates in modern Java?
I have a Java String of a standard ISO 8601 date in the YYYY-MM-DD format, such as 2016-03-21
.
How can I parse this into the modern Date-Time types in Java, the java.time classes?
Note: This is intended to be a canonical post for a common question.