Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mem48 committed Feb 11, 2025
1 parent 8b10a0a commit 88f136a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/stops_per_week_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ gtfs_trim_dates <- function(gtfs,
startdate = lubridate::ymd("2020-03-01"),
enddate = lubridate::ymd("2020-04-30")) {

if(enddate < startdate){
stop("enddate is before start date")
}

message("Trimming GTFS between ",startdate," and ",enddate)
stop_times <- gtfs$stop_times
trips <- gtfs$trips
Expand All @@ -166,7 +170,7 @@ gtfs_trim_dates <- function(gtfs,
# New gtfs_read loads in data.table IDate format
if(inherits(calendar$start_date,"IDate")){
calendar$start_date <- as.Date(calendar$start_date)
calendar$end_date <- as.Date(calendar$start_date)
calendar$end_date <- as.Date(calendar$end_date)
}

if(inherits(calendar_dates$date,"IDate")){
Expand Down

0 comments on commit 88f136a

Please sign in to comment.