package com.smppw.common.rollrange.date;

import com.smppw.common.pojo.enums.Frequency;

/**
 * @author Yu Liu
 *
 */
public interface DateConvertor {
	// Index is number of day from START_DATE that is 1900-01-01.
	String convertToString(int index);

	int convertToIndex(String date);

	int getDateOffset(String startDate, String endDate, Frequency frequency, boolean isUse5DaysPerWeek);

	String addPeriod(String date, int periods, Frequency frequency, PeriodPosition position, boolean isUse5DaysPerWeek);

	String setPeriodFirst(String date, Frequency frequency);

	String setPeriodLast(String date, Frequency frequency);
	
	String setPeriodLast(String date, Frequency frequency, boolean isUse5DaysPerWeek);

}
