???????????????????bug???????????????????????????????????????????console.log/alert?????????????????????????????????н?????

??????????????

???????????????????????????????????????????????С??????????????????jQuery.fn.differenceInWords?????е?????bug???????????????????????????????Bug??

var second = 1000;
var minute = 60 * second;
var hour = 60 * minute;
var day = 24 * hour;
try {
 // ????8???????????? "1 week ago"
 var dateStr = new Date(new Date() - 8 * day).toString();
 var element = jQuery('Replace me');
 element.differenceInWords();
 if (element.text() != "1 week ago") {
 throw new Error("8 day difference expected '1 week ago' got '"+
 element.text() + "'");
 }
 // ????????????????
 var diff = 3 * day + 2 * hour + 16 * minute + 10 * second;
 dateStr = new Date(new Date() - diff).toString();
 var element = jQuery('Replace me');
 element.differenceInWords();
 if (element.text() != "3 days?? 2 hours?? 16 minutes and 10 seconds ago") {
 throw new Error("Small date difference expected " +
 "'3 days?? 2 hours?? 16 minutes and 10 seconds ago' " +
 "got '" + element.text() + "'");
 }
 alert("All tests OK!");
} catch (e) {
 alert("Assertion failed: " + e.message);
}

???????????????????????????????????????д?????????????????????г?????????????????Щ????????????????????????У??????????????????н?????????????????????????????????????棬?????????????“All tests Ok!”????????????????λ????????

????????????????????????????Щ?鷳??????????????дlog??????????????????????????????????????????????????????????????????????????????????

?????? ?????????????κ?????κ???????????С?

?????? ??????????????????????????????????????????bug?????????????γ????

?????? ???????????????????Щ????????????????????

?????? ?????????????С??????????????????????????????????????????????????????

?????? ?????????浽??????????????e????alert????console.log????????????????

???????????????

??????????д????????????????????????????δ????????????????????????????н????????????????????????????????????????????????????????????????bug???????????????????????????????????????