months method

  1. @override
String months(
  1. int months
)
override

Format when time is in months

Implementation

@override
String months(int months) {
  if (months == 1) {
    return 'a month';
  } else if (months > 1 && months < 11) {
    return 'about $months months';
  } else {
    return '$months months';
  }
}