formatDate function

String formatDate(
  1. DateTime date
)

Implementation

String formatDate(DateTime date) {
  return "${date.year}-${date.month}-${date.day}";
}