質問

I want to parse Date from StringBuilder without conversion to String.

SimpleDataFormat.parse(String) implementation use only CharSequence methods, length() and charAt(), but defined as defined.

Is there simple (standard) way to do this, except copying the whole SimpleDateFormat class, for example?

役に立ちましたか?

解決

Seems there is DateTimeFormatter.parse(CharSequence) method in Java 8's java.time package. Overlooked it.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top