toDateString method

String toDateString()

Implementation

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