afreechart/src/main/java/org/afree/chart/axis/DateTickUnit.java
/**
     * Calculates a new date by adding this unit to the base date.
     *
     * @param base  the base date.
     * @param zone  the time zone for the date calculation.
     *
     * @return A new date one unit after the base date.
     *
     * @since JFreeChart 1.0.6
     */
Calculates a new date by adding this unit to the base date.
@param base  the base date.
@param zone  the time zone for the date calculation.

@return A new date one unit after the base date.


Calculates a new date by adding this unit to the base date . @param base the base date . @param zone the time zone for the date calculation . @return A new date one unit after the base date .
public Date addToDate(Date base, TimeZone zone) {
        Calendar calendar = mWorkCalendar;
        calendar.setTimeZone(zone);
        calendar.setTime(base);
        calendar.add(this.unitType.getCalendarField(), this.count);
        return calendar.getTime();
    }
public Date addToDate ( Date base , TimeZone zone ) { Calendar calendar = mWorkCalendar ; calendar . setTimeZone ( zone ) ; calendar . setTime ( base ) ; calendar . add ( this . unitType . getCalendarField ( ) , this . count ) ; return calendar . getTime ( ) ; }
Calculates a new date by adding this unit to the base date.
Calculates a new date by adding this unit to the base date .
// as far as I know, the Locale for the calendar only affects week // number calculations, and since DateTickUnit doesn't do week // arithmetic, the default locale (whatever it is) should be fine // here... //performance tuning //Calendar calendar = Calendar.getInstance(zone);