return null;
}
// Find a format dependent on the precision:
final DatePrecision precision = ((DateHolder) value).getPrecision();
if (precision == DatePrecision.DAY) {
return new CellFormat(DateFormats.getExcelFormatString(DateFormatType.DATE));
} else if (precision == DatePrecision.SECOND) {
return new CellFormat(DateFormats.getExcelFormatString(DateFormatType.DATE_TIME_SECONDS));
} else if (precision == DatePrecision.MILLISECOND) {
return new CellFormat(DateFormats.getExcelFormatString(DateFormatType.DATE_TIME_MILLIS));
} else {
// HOUR_OF_DAY, MINUTE, MINUTE_15 or null
return new CellFormat(DateFormats.getExcelFormatString(DateFormatType.DATE_TIME_MINUTES));
}
}