getMonth static method

dynamic getMonth(
  1. int month
)

Implementation

static getMonth(int month) {
  if (month > 12)
    return 1;
  else if (month < 1) return 1;
  return month;
}