How to convert two digit year to full year using Java 8 time API
问题 I wish to remove the Joda-Time library from my project. I am trying to convert a two digit year to full year. The following code from Joda-Time can fulfil the purpose. Below is the following code of joda-time DateTimeFormatter TWO_YEAR_FORMATTER = DateTimeFormat.forPattern("yy"); int year = LocalDate.parse("99"", TWO_YEAR_FORMATTER).getYear(); System.out.println(year); Output: 1999 This is the output that I expect and that makes sense in my situation. However, when I try the same procedure