getDateStr static method

String getDateStr(
  1. DateTime date
)

Implementation

static String getDateStr(DateTime date) {
  if (date.toString() == null) {
    return "";
  } else if (date.toString().length < 10) {
    return date.toString();
  }
  return date.toString().substring(0, 10);
}