Browse Source

Fix bug in yesterday date computation

master
Kenneth Bruen 2 years ago
parent
commit
c748f117c3
Signed by: kbruen
GPG Key ID: C1980A470C3EE5B1
  1. 2
      sw.js
  2. 2
      view-train.js

2
sw.js

@ -1,4 +1,4 @@
const VERSION = 'v12'
const VERSION = 'v13'
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
const API_TRAINS = `${API_ORIGIN}v3/trains`
const API_STATIONS = `${API_ORIGIN}v3/stations`

2
view-train.js

@ -346,7 +346,7 @@ function refresh() {
/**
* @type {Date}
*/
var reqDate = date
var reqDate = new Date(date.valueOf())
if (yesterday) {
reqDate.setDate(reqDate.getDate() - 1)
}

Loading…
Cancel
Save