Options
All
  • Public
  • Public/Protected
  • All
Menu

Module lib/hooks/useTimeAgo

Index

Functions

Functions

  • useTimeAgo(date: TDate, realtime?: boolean): TDate
  • Accepts a date and returns a human-friendly string for how long ago or how soon from now the date is

    Parameters

    • date: TDate

      the date to reformat

    • Optional realtime: boolean

      a bool for automatically updating the formatted date using a timeout

    Returns TDate

    • the given date formatted in terms of how long ago or how soon from now it is

Generated using TypeDoc