mirror of
https://github.com/moparisthebest/www.moparscape.org
synced 2024-12-25 00:48:49 -05:00
Return months when > 31 days.
This commit is contained in:
parent
38fd8d6ee9
commit
362c7834d7
@ -52,7 +52,7 @@ function prettyDate(time){
|
||||
var diff = (((new Date()).getTime() - date.getTime()) / 1000)
|
||||
var day_diff = Math.floor(diff / 86400);
|
||||
|
||||
if ( isNaN(day_diff) || day_diff < 0 || day_diff >= 31 )
|
||||
if ( isNaN(day_diff) || day_diff < 0)
|
||||
return;
|
||||
|
||||
return day_diff == 0 && (
|
||||
@ -63,7 +63,8 @@ function prettyDate(time){
|
||||
diff < 86400 && Math.floor( diff / 3600 ) + " hours ago") ||
|
||||
day_diff == 1 && "1 day ago" ||
|
||||
day_diff < 7 && day_diff + " days ago" ||
|
||||
day_diff < 31 && Math.ceil( day_diff / 7 ) + " weeks ago";
|
||||
day_diff < 31 && Math.ceil( day_diff / 7 ) + " weeks ago" ||
|
||||
true && Math.ceil( day_diff / 30 ) + " months ago";
|
||||
}
|
||||
|
||||
function getTwitterStatus(twitter_name){
|
||||
|
Loading…
Reference in New Issue
Block a user