diff options
Diffstat (limited to 'lib/Travel/Routing/DE/EFA/Route/Part.pm')
-rw-r--r-- | lib/Travel/Routing/DE/EFA/Route/Part.pm | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/lib/Travel/Routing/DE/EFA/Route/Part.pm b/lib/Travel/Routing/DE/EFA/Route/Part.pm index 2c9df16..7ed2722 100644 --- a/lib/Travel/Routing/DE/EFA/Route/Part.pm +++ b/lib/Travel/Routing/DE/EFA/Route/Part.pm @@ -6,7 +6,7 @@ use 5.010; use parent 'Class::Accessor'; -our $VERSION = '2.19'; +our $VERSION = '2.24'; my %occupancy = ( MANY_SEATS => 1, @@ -16,14 +16,15 @@ my %occupancy = ( Travel::Routing::DE::EFA::Route::Part->mk_ro_accessors( qw(arrival_platform arrival_stop - arrival_date arrival_time arrival_sdate arrival_stime delay - departure_platform + arrival_date arrival_time arrival_sdate arrival_stime arrival_delay + delay + departure_platform departure_delay departure_stop departure_date departure_time departure_sdate departure_stime footpath_duration footpath_type occupancy train_destination train_line train_product - ) + ) ); sub new { @@ -38,6 +39,8 @@ sub new { delete $ref->{occupancy}; } + $ref->{delay} = $ref->{departure_delay}; + return bless( $ref, $obj ); } @@ -168,7 +171,7 @@ points, without interchanges =head1 VERSION -version 2.19 +version 2.24 =head1 DESCRIPTION @@ -188,6 +191,10 @@ included in the calculation, "Scheduled" means it isn't. =over +=item $part->arrival_delay + +arrival delay in minutes, 0 if unknown + =item $part->arrival_stop arrival stop (city name plus station name) @@ -237,7 +244,11 @@ Returns a list of Travel::Routing::DE::EFA::Route::Message(3pm) objects. =item $part->delay -delay in minutes, 0 if unknown +alias for departure_delay + +=item $part->departure_delay + +departure delay in minutes, 0 if unknown =item $part->departure_stop @@ -344,9 +355,10 @@ In those cases, B<train_destination> and B<train_line> are usually empty. =item $part->via -Returns a list of C<< [ "DD.MM.YYYY", "HH:MM", stop, platform ] >> arrayrefs -encoding the stops passed between B<departure_stop> and B<arrival_stop>, -if supported by the backend. Returns nothing / an empty list otherwise. +Returns a list of C<< [ "DD.MM.YYYY", "HH:MM", stop, platform, delay ] >> +arrayrefs encoding the stops passed between B<departure_stop> and +B<arrival_stop>, if supported by the backend. Returns nothing / an empty list +otherwise. Date and time refer to schedule data and do not account for delays. =back @@ -373,7 +385,7 @@ Class::Accessor(3pm). =head1 AUTHOR -Copyright (C) 2011-2021 by Daniel Friesel E<lt>derf@finalrewind.orgE<gt> +Copyright (C) 2011-2021 by Birte Kristina Friesel E<lt>derf@finalrewind.orgE<gt> =head1 LICENSE |