function relativeTimeToNow(date) {
  const locale = getLocale();
  // Custom locale config to get our own translations for relative time and
  // avoid date-fns translations.
  // Overrides date-fns `distanceInWords` function.
  // https://github.com/date-fns/date-fns/blob/v1.29.0/src/locale/en/build_distance_in_words_locale/index.js
  const localeConfig = {
    distanceInWords: {
      localize: (token, count) => {
        switch (token) {
          case 'lessThanXSeconds':
            return t('{lessThanXSeconds}s', locale, {
              lessThanXSeconds: count,
            });
          case 'xSeconds':
            return t('{xSeconds}s', locale, { xSeconds: count });
          case 'halfAMinute':
            return t('{halfAMinute}s', locale, { halfAMinute: count });
          case 'lessThanXMinutes':
            return t('{lessThanXMinutes}m', locale, {
              lessThanXMinutes: count,
            });
          case 'xMinutes':
            return t('{xMinutes}m', locale, { xMinutes: count });
          case 'aboutXHours':
            return t('{aboutXHours}h', locale, { aboutXHours: count });
          case 'xHours':
            return t('{xHours}h', locale, { xHours: count });
          case 'xDays':
            return t('{xDays}d', locale, { xDays: count });
          case 'aboutXMonths':
            return t('{aboutXMonths}mo', locale, { aboutXMonths: count });
          case 'xMonths':
            return t('{xMonths}mo', locale, { xMonths: count });
          case 'aboutXYears':
            return t('{aboutXYears}y', locale, { aboutXYears: count });
          case 'xYears':
            return t('{xYears}y', locale, { xYears: count });
          case 'overXYears':
            return t('{overXYears}y', locale, { overXYears: count });
          case 'almostXYears':
            return t('{almostXYears}y', locale, { almostXYears: count });
          default:
            return '?';
        }
      },
    },
  };

  return distanceInWords(date, new Date(), { locale: localeConfig });
}
Wrapper for date-fns' distanceInWordsStrict applaying current locale.