Package gr.zeus.util

Class CurrentDateHelper

java.lang.Object
gr.zeus.util.CurrentDateHelper

public final class CurrentDateHelper extends Object
Helper methods for current date and time.

Since:
1.0
Author:
Gregory Kotsaftis
  • Constructor Details

    • CurrentDateHelper

      public CurrentDateHelper()
  • Method Details

    • getCurrentDate

      public static Date getCurrentDate()
      Gets the current date.

      Returns:
      The current date in java.util.Date object.
    • getCurrentDateLong

      public static long getCurrentDateLong()
      Gets the current date in long number format.

      Returns:
      The current date in long number format.
    • getCurrentYear

      public static int getCurrentYear()
      Gets the current year, e.g. 2004.

      Returns:
      The current year.
    • getCurrentMonth

      public static int getCurrentMonth()
      Gets the current month, JANUARY = 1,......,DECEMBER = 12.

      Returns:
      The current month.
    • getCurrentDay

      public static int getCurrentDay()
      Gets the current day in the month (1...31).

      Returns:
      The current day in a month.
    • getCurrentHour

      public static int getCurrentHour()
      Gets the current hour in 24 hours format.

      Returns:
      The current hour in 24 hours format.
    • getCurrentMinutes

      public static int getCurrentMinutes()
      Gets the current minutes in hour.

      Returns:
      The current minutes in hour.
    • getCurrentSeconds

      public static int getCurrentSeconds()
      Gets the current seconds in hour.

      Returns:
      The current seconds in hour.