[Askbot] Dates in year 2020 formatted wrong
Hi,
Just noticed this: for example in this question the year part of the question update date is shown wrong, if the year is 2020. The date is shown as Jan 1 '0
instead of Jan 1 '20
and I think found the reason. In utils.js file at line 3578:
return month_date + ' ' + "'" + date.getYear() % 20;
This results year 2020 to be returned as "0" instead of "20". This is easily fixable; something along these lines should work (not tested, but you get the idea):
var y = date.getYear() % 100;
if (y < 10) {
return month_date + " '0" + y;
}
else {
return month_date + " '" + y;
}
The rotation loops every 100 years, but I think we can live with it ;-)
On the other hand, since TJC is using jQuery 1.7.2 and the newest timeago plugin requires 1.6.7 to work, the whole plugin could be updated, too. The offset parameter must then be set to appropriate value (positive integer in milliseconds).
Thanks!
edit: tags
Hello, thanks we have noticed this and created an internal report.
jiit ( 2020-01-07 14:46:50 +0200 )editMaybe this shows how useful an update of askbot could be (2years later!)?
peterleinchen ( 2020-01-07 22:08:26 +0200 )edit
coderus ( 2020-01-07 23:11:13 +0200 )editdate.toLocaleDateString("en-US", {year: "2-digit"});
@peterlinechen The 2020 roadmap blog says:
So maybe that means an Askbot update or replacement ? Alternatively could be related to the IRC meetings.
MartinK ( 2020-01-08 15:40:37 +0200 )editAskBot won't be replaced anytime soon I think, because it has been integrated with Jollas internal systems, too. But an upgrade would require less work, I think...
Direc ( 2020-01-19 11:55:50 +0200 )edit