Class DateUtil

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

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

    • DateUtil

      private DateUtil()
      Not allowed to make a DateUtil
  • Method Details

    • createDate

      public static Date createDate(Month month, int day, int year)
      Creates a Date with the given month, day, and year.
      Parameters:
      month - The Month
      day - The day of the month
      year - The year
      Returns:
      A Date for the given month, day, and year
    • createDate

      public static Date createDate(String month, int day, int year)
      Creates a Date with the given month, day, and year.
      Parameters:
      month - The month as a string
      day - The day of the month
      year - The year
      Returns:
      A Date for the given month, day, and year
    • createDate

      public static Date createDate(int month, int day, int year)
      Creates a Date with the given month, day, and year.
      Parameters:
      month - The month as an integer (1 = January)
      day - The day of the month
      year - The year
      Returns:
      A Date for the given month, day, and year
    • convertToDate

      public static Date convertToDate(LocalDate localDate)
      Converts the given LocalDate to a Date.
      Parameters:
      localDate - The LocalDate to be converted
      Returns:
      The Date created from the LocalDate
    • convertToLocalDate

      public static LocalDate convertToLocalDate(Date date)
      Converts the given Date to a LocalDate.
      Parameters:
      date - The Date to be converted
      Returns:
      The LocalDate created from the Date