Package org.apache.commons.lang3.time
Class CalendarUtils
java.lang.Object
org.apache.commons.lang3.time.CalendarUtils
Helps use
Calendars.- Since:
- 3.10
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Calendarstatic final CalendarUtilsThe singleton instance forCalendar.getInstance(). -
Constructor Summary
ConstructorsConstructorDescriptionCalendarUtils(Calendar calendar) Creates an instance for the given Calendar. -
Method Summary
-
Field Details
-
INSTANCE
The singleton instance forCalendar.getInstance(). -
calendar
-
-
Constructor Details
-
CalendarUtils
Creates an instance for the given Calendar.- Parameters:
calendar- A Calendar.
-
-
Method Details
-
getDayOfMonth
public int getDayOfMonth()Gets the current day of month.- Returns:
- the current day of month.
-
getMonth
public int getMonth()Gets the current month.- Returns:
- the current month.
-
getYear
public int getYear()Gets the current year.- Returns:
- the current year.
-