Use this to create natural language for your unix timestamps (similar to Facebook's)
Plays well with browserify
Install with NPM and require where needed.
npm install fancy-timestamp
var fancyTimestamp = require('fancy-timestamp');
Fancy Timestamp can accept normal timestamps composed of seconds.
var normalTimestamp = 1342123755; //Using only seconds var fancyTimestampString = fancyTimestamp(normalTimestamp); // result == "8 minutes ago"
Where appropriate, fancy-timestamp will apply the appropriate ending to the natural language text such as 'tomorrow' or 'away' for dates in the future, and 'yesterday' or 'ago' for dates in the past.