diff options
author | stuebinm | 2022-11-29 16:38:21 +0100 |
---|---|---|
committer | stuebinm | 2022-11-29 16:38:21 +0100 |
commit | fb960c660357f9cd4dca57be1325e4ecbb50f649 (patch) | |
tree | 50ec4fdc1070252e7b52f72f40e5bfaa64efe2f7 /lib/GTFS.hs | |
parent | 574115063dcbad49bdb9392fbf370618243b12c4 (diff) |
controlroom: show tripShortName instead of tripId
since the ids really should be internal to the gtfs, and not needed in
"normal" contexts.
Diffstat (limited to 'lib/GTFS.hs')
-rw-r--r-- | lib/GTFS.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/GTFS.hs b/lib/GTFS.hs index 1fda897..8ff87db 100644 --- a/lib/GTFS.hs +++ b/lib/GTFS.hs @@ -639,3 +639,8 @@ runsToday :: MonadIO m => GTFS -> TripID -> m Bool runsToday gtfs trip = do today <- liftIO getCurrentTime <&> utctDay pure (runsOnDay gtfs trip today) + +tripName :: Trip a b -> Text +tripName Trip{..} = case tripShortName of + Just name -> name + Nothing -> tripTripID |