afreechart/src/main/java/org/afree/chart/axis/DateAxis.java
/**
     * Corrects the given tick date for the position setting.
     *
     * @param time  the tick date/time.
     * @param unit  the tick unit.
     * @param position  the tick position.
     *
     * @return The adjusted time.
     */
Corrects the given tick date for the position setting.
@param time  the tick date/time.
@param unit  the tick unit.
@param position  the tick position.

@return The adjusted time.
Corrects the given tick date for the position setting . @param time the tick date / time . @param unit the tick unit . @param position the tick position . @return The adjusted time .
private Date correctTickDateForPosition(Date time, DateTickUnit unit,
            DateTickMarkPosition position) {
        Date result = time;
        switch (unit.getUnit()) {
            case (DateTickUnit.MILLISECOND) :
            case (DateTickUnit.SECOND) :
            case (DateTickUnit.MINUTE) :
            case (DateTickUnit.HOUR) :
            case (DateTickUnit.DAY) :
                break;
            case (DateTickUnit.MONTH) :
                result = calculateDateForPosition(new Month(time,
                        this.timeZone, this.locale), position);
                break;
            case(DateTickUnit.YEAR) :
                result = calculateDateForPosition(new Year(time,
                        this.timeZone, this.locale), position);
                break;
            default: break;
        }
        return result;
    }
private Date correctTickDateForPosition ( Date time , DateTickUnit unit , DateTickMarkPosition position ) { Date result = time ; switch ( unit . getUnit ( ) ) { case ( DateTickUnit . MILLISECOND ) : case ( DateTickUnit . SECOND ) : case ( DateTickUnit . MINUTE ) : case ( DateTickUnit . HOUR ) : case ( DateTickUnit . DAY ) : break ; case ( DateTickUnit . MONTH ) : result = calculateDateForPosition ( new Month ( time , this . timeZone , this . locale ) , position ) ; break ; case ( DateTickUnit . YEAR ) : result = calculateDateForPosition ( new Year ( time , this . timeZone , this . locale ) , position ) ; break ; default : break ; } return result ; }
Corrects the given tick date for the position setting.
Corrects the given tick date for the position setting .