Enum Class DateUtils

java.lang.Object
java.lang.Enum<DateUtils>
com.linkedin.alpini.base.misc.DateUtils
All Implemented Interfaces:
Serializable, Comparable<DateUtils>, Constable

public enum DateUtils extends Enum<DateUtils>
  • Enum Constant Details

    • SINGLETON

      public static final DateUtils SINGLETON
  • Field Details

  • Method Details

    • values

      public static DateUtils[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DateUtils valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getRFC1123Date

      @Nonnull public static String getRFC1123Date(long timeMillis)
    • getRFC1123Date

      @Nonnull public static String getRFC1123Date(@Nonnull Date date)
    • getRFC1036Date

      @Nonnull public static String getRFC1036Date(long timeMillis)
    • getRFC1036Date

      @Nonnull public static String getRFC1036Date(@Nonnull Date date)
    • getAnsiCDate

      @Nonnull public static String getAnsiCDate(long timeMillis)
    • getAnsiCDate

      @Nonnull public static String getAnsiCDate(@Nonnull Date date)
    • parseRFC1123Date

      public static Date parseRFC1123Date(@Nonnull String dateValue)
    • parseDate

      public static Date parseDate(@Nonnull String dateValue)
    • escapedSplit

      public static String[] escapedSplit(String escape, String split, String target)
      Splits a target string according to some substring (non-regex), which may be escaped in the target string. E.g. escapedSplit("\\", ":", "urn\\:li\\:test:val") returns ["urn\\:li\\:test", "val"]
      Parameters:
      escape - The escape sequence (if present in target, it must itself also be escaped)
      split - The substring on which to tokenize.
      target - The string to split
      Returns:
      An array of tokens, split on a substring