Java – thread safe date parser

I am looking for a thread safe alternative to simpledateformat Parseobject is not implemented in the old fastdateformat, but an error is thrown Any ideas? I don't need any fancy, thread safe and the ability to handle this mode: "yyyy MM DD"

Solution

If possible, use joda time Its date / time parser is thread safe, and it usually has a better API than date / calendar

You can use its parser and then convert the return value to date, but I personally recommend using the entire library

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>