/time-ago

Formats a date using the Intl RelativeTimeFormat API with automatic unit selection.

Primary LanguageTypeScriptISC LicenseISC

@mskelton/time-ago

Build status

Installation

npm

npm install @mskelton/time-ago

Yarn

yarn add @mskelton/time-ago

Usage

import timeAgo from "@mskelton/time-ago"

console.log(timeAgo(new Date())) // now