enFormatters top-level property

Map<TimeUnit, String Function(int, bool)> enFormatters
getter/setter pair

Implementation

var enFormatters = <TimeUnit, String Function(int, bool)>{
  TimeUnit.now: (_, a) => a ? 'now' : 'just now',
  TimeUnit.today: (_, a) => a ? 'today' : 'today',
  TimeUnit.yesterday: (_, a) => a ? 'yest.' : 'yesterday',
  TimeUnit.tomorrow: (_, a) => a ? 'tom.' : 'tomorrow',
  TimeUnit.second: (v, a) => a ? '${v}s' : '$v second${v != 1 ? 's' : ''}',
  TimeUnit.minute: (v, a) => a ? '${v}m' : '$v minute${v != 1 ? 's' : ''}',
  TimeUnit.hour: (v, a) => a ? '${v}h' : '$v hour${v != 1 ? 's' : ''}',
  TimeUnit.day: (v, a) => a ? '${v}d' : '$v day${v != 1 ? 's' : ''}',
  TimeUnit.week: (v, a) => a ? '${v}w' : '$v week${v != 1 ? 's' : ''}',
  TimeUnit.month: (v, a) => a ? '${v}mo' : '$v month${v != 1 ? 's' : ''}',
  TimeUnit.year: (v, a) => a ? '${v}y' : '$v year${v != 1 ? 's' : ''}',
};