package com.cloudcross.ssp.common.utils;

import java.util.Comparator;

import com.cloudcross.ssp.model.DayParting;



public class AdvertiserSortByDate implements Comparator<DayParting>{

    @Override
    public int compare(DayParting o1, DayParting o2) {
          if (o1.getStartDate().after(o2.getStartDate())) {
              return 1;
          } else if (o1.getStartDate().before(o2.getStartDate())) {
              return -1;
          }
          
          return 0;
    }
}
