hour method

  1. @override
String hour(
  1. int amount, [
  2. bool abbreviated = true
])
override

Print amount hour for the corresponding locale. The unit is abbreviated if abbreviated is set to true.

Implementation

@override
String hour(int amount, [bool abbreviated = true]) {
  if (abbreviated) {
    return 'h';
  }

  switch (CzechDurationLocale.getPluralization(amount)) {
    case CzechDurationLocalePluralization.one:
      return 'hodina';
    case CzechDurationLocalePluralization.few:
      return 'hodiny';
    case CzechDurationLocalePluralization.many:
    default:
      return 'hodin';
  }
}