printYear method

String printYear(
  1. DateTime date
)

Implementation

String printYear(DateTime date) {
  final res = '${date.year}';
  if (res.length == 1) {
    return '0$res';
  }
  return res;
}