1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-12-04 15:28:05 +00:00

Some code cosmetics

This commit is contained in:
Ozzie Isaacs
2021-03-14 15:06:09 +01:00
parent 4df443e007
commit 8c751eb532
8 changed files with 57 additions and 54 deletions

View File

@@ -138,8 +138,8 @@ $(function () {
seriesTitle = result.series.title;
}
var dateFomers = result.pubdate.split("-");
var publishedYear = parseInt(dateFomers[0]);
var publishedMonth = parseInt(dateFomers[1]);
var publishedYear = parseInt(dateFomers[0], 10);
var publishedMonth = parseInt(dateFomers[1], 10);
var publishedDate = new Date(publishedYear, publishedMonth - 1, 1);
publishedDate = formatDate(publishedDate);
@@ -194,8 +194,8 @@ $(function () {
} else {
dateFomers = result.date_added.split("-");
}
var publishedYear = parseInt(dateFomers[0]);
var publishedMonth = parseInt(dateFomers[1]);
var publishedYear = parseInt(dateFomers[0], 10);
var publishedMonth = parseInt(dateFomers[1], 10);
var publishedDate = new Date(publishedYear, publishedMonth - 1, 1);
publishedDate = formatDate(publishedDate);