toYmd method

String toYmd()

Implementation

String toYmd() {
  String y = '$_year';
  while (y.length < 4) {
    y = '0' + y;
  }
  return '$y-${_month < 10 ? '0' : ''}$_month-${_day < 10 ? '0' : ''}$_day';
}