Showing 8 of 8 total issues
Function relativeDate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn.relativeDate = function(opts){
var defaults = {
dateGetter: function(el){
return $(el).text();
}
Avoid too many return
statements within this function. Open
Open
if (distance_in_minutes < 86400) { return 'about 1 month ago'; }
Avoid too many return
statements within this function. Open
Open
if (distance_in_minutes < 43200) { return Math.floor(distance_in_minutes / 1440) + ' days ago'; }
Avoid too many return
statements within this function. Open
Open
return 'over ' + Math.floor(distance_in_minutes / 525960) + ' years ago';
Avoid too many return
statements within this function. Open
Open
if (distance_in_minutes < 1051199) { return 'about 1 year ago'; }
Avoid too many return
statements within this function. Open
Open
if (distance_in_minutes < 525960) { return Math.floor(distance_in_minutes / 43200) + ' months ago'; }
Avoid too many return
statements within this function. Open
Open
if (distance_in_minutes < 2880) { return '1 day ago'; }
Avoid too many return
statements within this function. Open
Open
if (distance_in_minutes < 1440) { return 'about ' + Math.round(distance_in_minutes / 60) + ' hours ago'; }