Skip to content

Commit

Permalink
Bugfix: trips function used the wrong date format
Browse files Browse the repository at this point in the history
  • Loading branch information
BolverBlitz committed Mar 9, 2024
1 parent 5f4be05 commit 87fa73c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@ class openvgn {
if (!Fahrtnummer) { return new Error("getTrip: Fahrtnummer can´t be empty.") }
let url;
if (parameter.date) {
const date = new Date(parameter.date).toLocaleTimeString("de-DE", { day: "2-digit", month: "2-digit", year: "numeric" }).split(",")[0];
url = `${this.api_url}/fahrten.json/${parameter.product}/${date}/${Fahrtnummer}`;
url = `${this.api_url}/fahrten.json/${parameter.product}/${parameter.date}/${Fahrtnummer}`;
} else {
url = `${this.api_url}/fahrten.json/${parameter.product}/${Fahrtnummer}`;
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oepnv-nuremberg",
"version": "0.3.0",
"version": "0.3.1",
"description": "A wrapper for multiple datapoints from VAG and VGN",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 87fa73c

Please sign in to comment.