simple-timeago
Create simple human-readable fuzzy-timestamps
example
var timeAgo = ; var startTime = ;var thirtyOneMinutesAgo = startTime - 186e+6; console;// 31 minutes ago
methods
var timeAgo = ;
timeAgo(since, until)
since
-Date
object to calculate time-since from.until
-Date
object to calculate time-since to. (Optional, defaults to now (new Date()
))
Returns a string
of fuzzy time.
install
npm install simple-timeago
test
npm test
license
MIT