Module bus.core

Class FastDateParser

java.lang.Object
org.miaixz.bus.core.center.date.printer.SimpleDatePrinter
org.miaixz.bus.core.center.date.format.parser.FastDateParser
All Implemented Interfaces:
Serializable, DateParser, PositionDateParser, DatePrinter

public class FastDateParser extends SimpleDatePrinter implements PositionDateParser
线程安全的日期解析器,替代 SimpleDateFormat,用于将日期字符串转换为 Date 对象。
Since:
Java 17+
Author:
Kimi Liu
See Also:
  • Constructor Details

    • FastDateParser

      public FastDateParser(String pattern, TimeZone timeZone, Locale locale)
      构造FastDateParser实例,推荐使用FormatBuilder的工厂方法获取缓存实例。
      Parameters:
      pattern - 非空的SimpleDateFormat兼容格式
      timeZone - 非空时区
      locale - 非空地域
    • FastDateParser

      public FastDateParser(String pattern, TimeZone timeZone, Locale locale, Date centuryStart)
      构造FastDateParser实例,允许指定世纪起始时间。
      Parameters:
      pattern - 非空的SimpleDateFormat兼容格式
      timeZone - 非空时区
      locale - 非空地域
      centuryStart - 两位年份解析的世纪起始时间
  • Method Details