Class MonthUtil

java.lang.Object
com.github.tadukoo.util.time.MonthUtil

public final class MonthUtil extends Object
Month Util provides utilities for dealing with Months.
Version:
Alpha v.0.2.1
Author:
Logan Ferree (Tadukoo)
  • Constructor Details

    • MonthUtil

      private MonthUtil()
      Can't create a MonthUtil
  • Method Details

    • parseFromString

      public static Month parseFromString(String str)
      Parses a Month from the given string. May return null if none match.
      Parameters:
      str - The string to be parsed into a Month
      Returns:
      The Month matching the given string, or null
    • asString

      public static String asString(Month month)
      Converts the given Month to its full, capitalized, US-Locale string. This is an easy way instead of having to call Month.getDisplayName(TextStyle, Locale) all the time.
      Parameters:
      month - The Month to get as a string
      Returns:
      The full string of the Month
    • asStringArray

      public static String[] asStringArray()
      Creates a String array of the Months.
      Returns:
      A String array of the Months