Class DateImpl<C extends ICalendar<C>>

    • Method Detail

      • getYear

        public final int getYear()
        Specified by:
        getYear in interface IDate<C extends ICalendar<C>>
        Returns:
        the year
      • getMonth

        public final int getMonth()
        Specified by:
        getMonth in interface IDate<C extends ICalendar<C>>
        Returns:
        the month. For Hebrew month numbering, see net.hebrewcalendar.JewishMonth.
      • getDay

        public final int getDay()
        Specified by:
        getDay in interface IDate<C extends ICalendar<C>>
        Returns:
        day of month
      • getCalendar

        public final C getCalendar()
        Specified by:
        getCalendar in interface IDate<C extends ICalendar<C>>
        Returns:
        the calendar for which this date was created.
      • before

        public final boolean before​(IDate<?> otherDate)
        Description copied from interface: IDate
        Compare dates and return true if this IDate is strictly before the arg one
        Specified by:
        before in interface IDate<C extends ICalendar<C>>
        Returns:
        true when this date is strictly before otherDate
      • after

        public final boolean after​(IDate<?> otherDate)
        Description copied from interface: IDate
        Compare dates and return true if this IDate is strictly after the arg one
        Specified by:
        after in interface IDate<C extends ICalendar<C>>
        Returns:
        true when this date is strictly after otherDate
      • absDay

        public long absDay()
      • addDays

        public final DateImpl<C> addDays​(int numDays)
        Description copied from interface: IDate
        Increment by given number of days
        Specified by:
        addDays in interface IDate<C extends ICalendar<C>>
        Parameters:
        numDays - days to add
        Returns:
        new date object
      • subtractDays

        public final DateImpl<C> subtractDays​(int numDays)
        Description copied from interface: IDate
        Decrement by given number of days
        Specified by:
        subtractDays in interface IDate<C extends ICalendar<C>>
        Parameters:
        numDays - days to subtract
        Returns:
        new date object
      • getDayOfWeek

        public final int getDayOfWeek()
        1 - Sunday .. 7 - Saturday
        Specified by:
        getDayOfWeek in interface IDate<C extends ICalendar<C>>
        Returns:
        day of week 1-7