-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1259 from opentripplanner/date-restricted-requests
only show routes from current service week
- Loading branch information
Showing
10 changed files
with
2,635 additions
and
4,922 deletions.
There are no files selected for viewing
543 changes: 543 additions & 0 deletions
543
__tests__/components/viewers/__snapshots__/nearby-view.js.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { addDays, nextSunday, previousSunday } from 'date-fns' | ||
/** Gets the current service week */ | ||
export const getCurrentServiceWeek = (): { | ||
end: string | ||
start: string | ||
} => { | ||
const start = previousSunday(new Date()).toISOString().split('T')[0] | ||
const end = addDays(nextSunday(new Date()), 1).toISOString().split('T')[0] | ||
return { end, start } | ||
} |
Oops, something went wrong.