Alternatives to FastDateFormat for efficient date parsing?

后端 未结 6 925
-上瘾入骨i
-上瘾入骨i 2021-02-05 04:29

Well aware of performance and thread issues with SimpleDateFormat, I decided to go with FastDateFormat, until I realized that FastDateFormat

6条回答
  •  走了就别回头了
    2021-02-05 05:14

    As of Java 8, one can use DateTimeFormatter along with the the Java 8 Time API to both parse and format dates. From the documentation:

    This class is immutable and thread-safe.

    It's recommended to use this class if possible for new work going forward instead of using SimpleDateFormat.

提交回复
热议问题