Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

247 B
Raw Blame
import dayjs from 'dayjs';
import { getDayjsLocale } from './dayjs-locale';

export function formatRelativeTime(ts: number): string {
  const locale = getDayjsLocale();
  return locale ? dayjs(ts).locale(locale).fromNow() : dayjs(ts).fromNow();
}