mskelton / time-ago

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@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

About

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

License:ISC License


Languages

Language:TypeScript 100.0%