Skip to content

Instantly share code, notes, and snippets.

@anbinh
Forked from jed/LICENSE.txt
Last active December 15, 2015 14:29
Show Gist options
  • Save anbinh/5275148 to your computer and use it in GitHub Desktop.
Save anbinh/5275148 to your computer and use it in GitHub Desktop.
timeAgo
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
function(a,b,c){for(b=[1e3,60,60,24],a=new Date-a,c=0;a>2*b[c];a/=b[c++]);return~~a+" "+"m0second0minute0hour0day".split(0)[c]+"s ago"}
{
"name": "timeAgo",
"keywords": ["time", "chronological", "ago"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment