类 ZonedDateTimeToCalendarConverter

java.lang.Object
cn.taketoday.core.conversion.support.ZonedDateTimeToCalendarConverter
所有已实现的接口:
Converter<ZonedDateTime,Calendar>

final class ZonedDateTimeToCalendarConverter extends Object implements Converter<ZonedDateTime,Calendar>
Simple converter from Java 8's ZonedDateTime to Calendar.

Note that Framework's default ConversionService setup understands the 'from'/'to' convention that the JSR-310 java.time package consistently uses. That convention is implemented reflectively in ObjectToObjectConverter, not in specific JSR-310 converters. It covers GregorianCalendar.toZonedDateTime() as well, and also Date.from(java.time.Instant) and Date.toInstant().

从以下版本开始:
4.0
作者:
Juergen Hoeller
另请参阅:
  • 构造器详细资料

    • ZonedDateTimeToCalendarConverter

      ZonedDateTimeToCalendarConverter()
  • 方法详细资料

    • convert

      public Calendar convert(ZonedDateTime source)
      从接口复制的说明: Converter
      Convert the source object of type S to target type T.
      指定者:
      convert 在接口中 Converter<ZonedDateTime,Calendar>
      参数:
      source - the source object to convert, which must be an instance of S (never null)
      返回:
      the converted object, which must be an instance of T (potentially null)