TimeAgoLabels.enShort constructor

TimeAgoLabels.enShort()

Short English (default, backward compatible): 5m ago, 3w ago, 2mo ago.

Implementation

factory TimeAgoLabels.enShort() {
  const u = {
    TimeUnit.second: 's',
    TimeUnit.minute: 'm',
    TimeUnit.hour: 'h',
    TimeUnit.day: 'd',
    TimeUnit.week: 'w',
    TimeUnit.month: 'mo',
    TimeUnit.year: 'y',
  };
  return TimeAgoLabels(
    justNow: 'just now',
    format: (v, unit) => '$v${u[unit]} ago',
  );
}