1.0.0 • Published 9 years ago
date-since v1.0.0
Date Since
Parses a javascript date and turns it into a "x time ago" format where time can be seconds, minutes, hours, days, or years.
example
> import dateSince from 'date-since'
> const time = new Date()
> console.log(dateSince(time))
2 seconds ago
methods
import dateSince from 'date-since';
dateSince(date)
returns a string that formats the date into the aforementioned format.
install
With npm do:
npm install date-since
license
MIT
1.0.0
9 years ago