Class DateAdapterFormats


  • public final class DateAdapterFormats
    extends NativeObjectContainer
    Contains all date time formats that a date adapter can manage.
    Author:
    Andrea "Stock" Stocchero
    • Constructor Detail

      • DateAdapterFormats

        protected DateAdapterFormats()
        Creates the object with an empty native object instance.
      • DateAdapterFormats

        protected DateAdapterFormats​(NativeObject nativeObject)
        Creates the object with the native object to map java script properties.
        Parameters:
        nativeObject - native object to map java script properties
    • Method Detail

      • getDateTime

        public String getDateTime()
        Returns the date time format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the date time format provided by adapter.
      • getMillisecond

        public String getMillisecond()
        Returns the millisecond format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the millisecond format provided by adapter.
      • getSecond

        public String getSecond()
        Returns the second format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the second format provided by adapter.
      • getMinute

        public String getMinute()
        Returns the minute format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the minute format provided by adapter.
      • getHour

        public String getHour()
        Returns the hour format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the hour format provided by adapter.
      • getDay

        public String getDay()
        Returns the day format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the day format provided by adapter.
      • getWeek

        public String getWeek()
        Returns the week format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the week format provided by adapter.
      • getMonth

        public String getMonth()
        Returns the month format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the month format provided by adapter.
      • getQuarter

        public String getQuarter()
        Returns the quarter format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the quarter format provided by adapter.
      • getYear

        public String getYear()
        Returns the year format provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Returns:
        the year format provided by adapter.
      • getFormat

        public String getFormat​(TimeUnit unit)
        Returns the format by TimeUnit provided by adapter.
        If not set, returns Constants.EMPTY_STRING.
        Parameters:
        unit - time unit to use to get the default
        Returns:
        the format provided by adapter