目的

为了校验ISO 8601格式的日期,2020-12-33T14:32:25.072+08:00

格式转换 SimpleDateFormat

final String ISO_PATTERN = "yyyy-MM-dd'T'HH:mm:sss.SSSXXX";
SimpleDateFormat dateFormat = new SimpleDateFormat(ISO_PATTERN);
dateFormat.parse(o);

字符说明

SimpleDateFormat 转换 ISO 8601日期格式 2020-12-33T14:32:25.072+08:00
SimpleDateFormat 转换 ISO 8601日期格式 2020-12-33T14:32:25.072+08:00

官方文档

https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

相关文章:

  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案