public static String dateToString(Date date,Resolution resolution){
  return timeToString(date.getTime(),resolution);
}

public static String dateToString ( Date date , Resolution resolution ) { return timeToString ( date . getTime ( ) , resolution ) ; }
converts a date to a string suitable for indexing .
