File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Time Ago (for jQuery) version: 0.1 (07/18/2008)
2
+ * Time Ago (for jQuery) version: 0.2 (07/18/2008)
3
3
* @requires jQuery v1.2 or later
4
4
*
5
5
* Timeago is a jQuery plugin that makes it easy to support automatically
32
32
var years = days / 365 ;
33
33
34
34
var words = seconds < 45 && "less than a minute" ||
35
- seconds < 90 && "about 1 minute" ||
35
+ seconds < 90 && "about a minute" ||
36
36
minutes < 45 && Math . round ( minutes ) + " minutes" ||
37
- minutes < 90 && "about 1 hour" ||
38
- hours < 24 && Math . round ( hours ) + " hours" ||
39
- hours < 48 && "about 1 day" ||
37
+ minutes < 90 && "about an hour" ||
38
+ hours < 24 && "about " + Math . round ( hours ) + " hours" ||
39
+ hours < 48 && "a day" ||
40
40
days < 30 && Math . floor ( days ) + " days" ||
41
- days < 60 && "about 1 month" ||
41
+ days < 60 && "about a month" ||
42
42
days < 365 && Math . floor ( days / 30 ) + " months" ||
43
- years < 2 && "about 1 year" ||
43
+ years < 2 && "about a year" ||
44
44
Math . floor ( years ) + " years" ;
45
45
46
46
return words + " ago" ;
You can’t perform that action at this time.
0 commit comments