Package gr.zeus.util
Class CurrentDateHelper
java.lang.Object
gr.zeus.util.CurrentDateHelper
Helper methods for current date and time.
- Since:
- 1.0
- Author:
- Gregory Kotsaftis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Date
Gets the current date.static long
Gets the current date in long number format.static int
Gets the current day in the month (1...31).static int
Gets the current hour in 24 hours format.static int
Gets the current minutes in hour.static int
Gets the current month, JANUARY = 1,......,DECEMBER = 12.static int
Gets the current seconds in hour.static int
Gets the current year, e.g.
-
Constructor Details
-
CurrentDateHelper
public CurrentDateHelper()
-
-
Method Details
-
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.
-