📜  使用者:java.time.format.DateTimeParseException:无法在索引 0 处解析文本“Fri Jan 07 13:37:48 EET 2022” - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:38.649000             🧑  作者: Mango

代码示例1
DateTimeFormatter df = new DateTimeFormatterBuilder()
    // case insensitive to parse JAN and FEB
    .parseCaseInsensitive()
    // add pattern
    .appendPattern("dd-MMM-yyyy")
    // create formatter (use English Locale to parse month names)
    .toFormatter(Locale.ENGLISH);