Class CalendarUtils


  • public class CalendarUtils
    extends java.lang.Object
    Helps use Calendars.
    Since:
    3.10
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static CalendarUtils INSTANCE
      The singleton instance for Calendar.getInstance().
    • Constructor Summary

      Constructors 
      Constructor Description
      CalendarUtils​(java.util.Calendar calendar)
      Creates an instance for the given Calendar.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getDayOfMonth()
      Gets the current day of month.
      int getMonth()
      Gets the current month.
      int getYear()
      Gets the current year.
      • Methods inherited from class java.lang.Object

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

      • INSTANCE

        public static final CalendarUtils INSTANCE
        The singleton instance for Calendar.getInstance().
    • Constructor Detail

      • CalendarUtils

        public CalendarUtils​(java.util.Calendar calendar)
        Creates an instance for the given Calendar.
        Parameters:
        calendar - A Calendar.
    • Method Detail

      • 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.