getYearMonthDate method

String getYearMonthDate(
  1. DateTime dateTime
)

Implementation

String getYearMonthDate(DateTime dateTime) {
  String month = dateTime.month.toString();
  String date = dateTime.day.toString();
  return dateTime.year.toString() + '/' + (month.length == 1 ? '0' : '') + month + '/' + (date.length == 1 ? '0' : '') + date;
}