Class DateUtilities


  • public class DateUtilities
    extends java.lang.Object
    Some useful date methods.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Calendar CALENDAR
      A working calendar.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DateUtilities()
      Private constructor to prevent object creation.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Date createDate​(int yyyy, int month, int day)
      Creates a date.
      static java.util.Date createDate​(int yyyy, int month, int day, int hour, int min)
      Creates a date.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • CALENDAR

        private static final java.util.Calendar CALENDAR
        A working calendar.
    • Constructor Detail

      • DateUtilities

        private DateUtilities()
        Private constructor to prevent object creation.
    • Method Detail

      • createDate

        public static java.util.Date createDate​(int yyyy,
                                                int month,
                                                int day)
        Creates a date.
        Parameters:
        yyyy - the year.
        month - the month (1 - 12).
        day - the day.
        Returns:
        a date.
      • createDate

        public static java.util.Date createDate​(int yyyy,
                                                int month,
                                                int day,
                                                int hour,
                                                int min)
        Creates a date.
        Parameters:
        yyyy - the year.
        month - the month (1 - 12).
        day - the day.
        hour - the hour.
        min - the minute.
        Returns:
        a date.