mirror of
https://codeberg.org/kbruen/kai.infotren.git
synced 2025-02-22 17:19:37 +02:00
Fix bug in yesterday date computation
This commit is contained in:
parent
7bd7b26256
commit
c748f117c3
2 changed files with 2 additions and 2 deletions
2
sw.js
2
sw.js
|
@ -1,4 +1,4 @@
|
||||||
const VERSION = 'v12'
|
const VERSION = 'v13'
|
||||||
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
|
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
|
||||||
const API_TRAINS = `${API_ORIGIN}v3/trains`
|
const API_TRAINS = `${API_ORIGIN}v3/trains`
|
||||||
const API_STATIONS = `${API_ORIGIN}v3/stations`
|
const API_STATIONS = `${API_ORIGIN}v3/stations`
|
||||||
|
|
|
@ -346,7 +346,7 @@ function refresh() {
|
||||||
/**
|
/**
|
||||||
* @type {Date}
|
* @type {Date}
|
||||||
*/
|
*/
|
||||||
var reqDate = date
|
var reqDate = new Date(date.valueOf())
|
||||||
if (yesterday) {
|
if (yesterday) {
|
||||||
reqDate.setDate(reqDate.getDate() - 1)
|
reqDate.setDate(reqDate.getDate() - 1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue