You are viewing a single comment's thread. Return to all comments →
Javascript solution
var yearDiff = y1 - y2; var monthDiff = m1 - m2; var dayDiff = d1 - d2; if (yearDiff > 0) { return 10000; } if (yearDiff == 0 && monthDiff > 0) { return monthDiff * 500; } if (yearDiff == 0 && monthDiff == 0 && dayDiff > 0) { return dayDiff * 15; } return 0;
Seems like cookies are disabled on this browser, please enable them to open this website
Library Fine
You are viewing a single comment's thread. Return to all comments →
Javascript solution