Trying to parse incoming dates from a third-party source, some dates work as expected others throw an exception:
Text 'Fri, 11 Jun 2021 02:25:23 +0000' could not be parsed at index 8
Looking at the dates I can't spot a difference in them, and looking at my formatter I can't see where I've gone wrong.
Example failing date: Fri, 11 Jun 2021 02:25:23 +0000
Example passing date: Sun, 30 May 2021 11:42:03 +0000
The code I'm using to parse the dates:
ZonedDateTime.parse(incomingDate, DateTimeFormatter.ofPattern("E, d MMM yyyy HH:mm:ss Z"));
The only thing I can think that some date months are shorthand vs others that are not (May vs Jun for example).
Would love some help.