psdi.util

Class GregorianCalendarPlus

  • java.lang.Object
    • java.util.Calendar
      • java.util.GregorianCalendar
        • psdi.util.GregorianCalendarPlus
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable


    public class GregorianCalendarPlus
    extends java.util.GregorianCalendar
    Extends Gregorian calendar and provides support for adding or subtracting HOUR and MINUTE that is of type double. This class is useful when there is a need to add/subtract fractional time to a Calendar. For example add 3.5 hours to the current time.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.Calendar

        java.util.Calendar.Builder
    • Field Summary

      • Fields inherited from class java.util.GregorianCalendar

        AD, BC
      • Fields inherited from class java.util.Calendar

        ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, LONG_FORMAT, LONG_STANDALONE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NARROW_FORMAT, NARROW_STANDALONE, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SHORT_FORMAT, SHORT_STANDALONE, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void add(int field, double amount)
      Add or subtract HOURS or MINUTES to the existing time.
      • Methods inherited from class java.util.GregorianCalendar

        add, clone, computeFields, computeTime, equals, from, getActualMaximum, getActualMinimum, getCalendarType, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, getWeeksInWeekYear, getWeekYear, hashCode, isLeapYear, isWeekDateSupported, roll, roll, setGregorianChange, setTimeZone, setWeekDate, toZonedDateTime
      • Methods inherited from class java.util.Calendar

        after, before, clear, clear, compareTo, complete, get, getAvailableCalendarTypes, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, toInstant, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GregorianCalendarPlus

        public GregorianCalendarPlus()
      • GregorianCalendarPlus

        public GregorianCalendarPlus(java.util.TimeZone zone)
      • GregorianCalendarPlus

        public GregorianCalendarPlus(java.util.Locale aLocale)
      • GregorianCalendarPlus

        public GregorianCalendarPlus(java.util.TimeZone zone,
                                     java.util.Locale aLocale)
      • GregorianCalendarPlus

        public GregorianCalendarPlus(int year,
                                     int month,
                                     int dayOfMonth)
      • GregorianCalendarPlus

        public GregorianCalendarPlus(int year,
                                     int month,
                                     int dayOfMonth,
                                     int hourOfDay,
                                     int minute)
      • GregorianCalendarPlus

        public GregorianCalendarPlus(int year,
                                     int month,
                                     int dayOfMonth,
                                     int hourOfDay,
                                     int minute,
                                     int second)
    • Method Detail

      • add

        public void add(int field,
                        double amount)
        Add or subtract HOURS or MINUTES to the existing time.
        Parameters:
        field - - CALENDAR.HOUR or CALENDAR.MINUTE
        amount - - double