Class DateTypeConverter

java.lang.Object
org.apache.logging.log4j.core.config.plugins.convert.DateTypeConverter

public final class DateTypeConverter extends Object
Utility methods for Date classes.
  • Method Details

    • fromMillis

      public static <D extends Date> D fromMillis(long millis, Class<D> type)
      Create a Date-related object from a timestamp in millis.
      Type Parameters:
      D - date class to use
      Parameters:
      millis - timestamp in millis
      type - date type to use
      Returns:
      new instance of D or null if there was an error