Enum Class Dates

java.lang.Object
java.lang.Enum<Dates>
eu.hansolo.toolbox.time.Dates
All Implemented Interfaces:
Serializable, Comparable<Dates>, Constable

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

    • yyyy_MM_dd

      public static final Dates yyyy_MM_dd

      Format : yyyy-MM-dd

      Example: 2022-03-30

    • yyyy_MM

      public static final Dates yyyy_MM

      Format : yyyy-MM

      Example: 2022-03

    • yyyyMMdd

      public static final Dates yyyyMMdd

      Format : yyyyMMdd

      Example: 20220330

    • yyyyMM

      public static final Dates yyyyMM

      Format : yyyyMM

      Example: 202203

    • yyyy

      public static final Dates yyyy

      Format : yyyy

      Example: 2022

    • yyyy_w

      public static final Dates yyyy_w

      Format : yyyy-'W'w

      Example: 2022-W01

    • yyyyw

      public static final Dates yyyyw

      Format : yyyy'W'w

      Example: 2022W01

    • yyyy_w_e

      public static final Dates yyyy_w_e

      Format : yyyy-'W'w-e

      Example: 2022-W01-2

    • yyyywe

      public static final Dates yyyywe

      Format : yyyy'W'we

      Example: 2022-W01-2

    • dd_MM_yyyy

      public static final Dates dd_MM_yyyy

      Format : dd-MM-yyyy

      Example: 30-03-2022

    • MM_dd_yyyy

      public static final Dates MM_dd_yyyy

      Format : MM-dd-yyyy

      Example: 03-30-2022

    • MMMM_dd_yyyy

      public static final Dates MMMM_dd_yyyy

      Format : MMMM dd, yyyy

      Example: March 30, 2022

    • MMMM_dd

      public static final Dates MMMM_dd

      Format : MMMM dd

      Example: March 30

    • MMM_dd_yyyy

      public static final Dates MMM_dd_yyyy

      Format : MMM dd, yyyy

      Example: Mar 30, 2022

    • MMM_dd

      public static final Dates MMM_dd

      Format : MMM dd

      Example: Mar 30

    • dd_MMM_yyyy

      public static final Dates dd_MMM_yyyy

      Format : dd MMM yyyy

      Example: 30 Mar 2022

    • dd_MMM

      public static final Dates dd_MMM

      Format : dd MMM

      Example: 30 Mar

    • dd_MMMM_yyyy

      public static final Dates dd_MMMM_yyyy

      Format : dd MMMM yyyy

      Example: 30 March 2022

    • dd_MMMM

      public static final Dates dd_MMMM

      Format : dd MMMM

      Example: 30 March

  • Method Details

    • values

      public static Dates[] 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 Dates 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
    • parse

      public LocalDate parse(String text)
    • parseDate

      public Date parseDate(String text)
    • parseDate

      public Date parseDate(String text, ZoneId zoneId)
    • format

      public String format(LocalDate date)
    • format

      public String format(Date date)
    • format

      public String format(Date date, ZoneId zoneId)