fixMonthOrDayTo01 static method

String fixMonthOrDayTo01(
  1. String fix
)

Som months write as one single number when they should be write as two, for example: 9 should be 09, 1 should be 01...

Implementation

static String fixMonthOrDayTo01(String fix) {
  if (fix.length == 2) {
    return fix;
  } else {
    return '0$fix';
  }
}