Skip to content

Commit

Permalink
Fix Api change return value Calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis06030631 committed Oct 26, 2023
1 parent f505384 commit 0386128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sncf.js",
"version": "2.4.1",
"version": "2.4.2",
"description": "An easy to use javascript module to get all the information in real time about the trains ©SNCF (only in France)",
"scripts": {
"test": "nodemon test.js --watch test.js --watch dist",
Expand Down
4 changes: 2 additions & 2 deletions src/structures/Calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export class Calendar {
// @ts-ignore
.map(active_period => {
return {
start_date: new Date(active_period.start_date.slice(0, 4), active_period.start_date.slice(4, 6) - 1, active_period.start_date.slice(6, 8)),
end_date: new Date(active_period.end_date.slice(0, 4), active_period.end_date.slice(4, 6) - 1, active_period.end_date.slice(6, 8))
start_date: new Date(active_period.begin.slice(0, 4), active_period.begin.slice(4, 6) - 1, active_period.begin.slice(6, 8)),
end_date: new Date(active_period.end.slice(0, 4), active_period.end.slice(4, 6) - 1, active_period.end.slice(6, 8))
}
});
this.week_pattern = {
Expand Down

0 comments on commit 0386128

Please sign in to comment.