Skip to content

Instantly share code, notes, and snippets.

View patrickmooney's full-sized avatar

Patrick Mooney patrickmooney

View GitHub Profile
function timeSince(timeStamp) {
var now = new Date(),
secondsPast = (now.getTime() - timeStamp.getTime()) / 1000;
if(secondsPast < 60){
return parseInt(secondsPast) + 's';
}
if(secondsPast < 3600){
return parseInt(secondsPast/60) + 'm';
}
if(secondsPast <= 86400){
@charset 'UTF-8';
/*
* Author: Name @Bolt Brasil
* Project: Project Name
* Date: Date of Project
*/
/* ==========>> Summary
=Imports