toDateString method
Implementation
String toDateString() {
return year.toString() +
'-' +
month.toString().padLeft(2, '0') +
'-' +
day.toString().padLeft(2, '0');
}
String toDateString() {
return year.toString() +
'-' +
month.toString().padLeft(2, '0') +
'-' +
day.toString().padLeft(2, '0');
}