TimeAgoLabels.en constructor

TimeAgoLabels.en()

Long English with pluralisation: 5 minutes ago, 1 hour ago.

Implementation

factory TimeAgoLabels.en() {
  const u = {
    TimeUnit.second: 'second',
    TimeUnit.minute: 'minute',
    TimeUnit.hour: 'hour',
    TimeUnit.day: 'day',
    TimeUnit.week: 'week',
    TimeUnit.month: 'month',
    TimeUnit.year: 'year',
  };
  return TimeAgoLabels(
    justNow: 'just now',
    format: (v, unit) => '$v ${u[unit]}${v == 1 ? '' : 's'} ago',
  );
}