summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-04-06 21:59:13 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-04-06 21:59:13 +0200
commit7bc003924c778e453265492e63674b7334384374 (patch)
tree18f0169f86c466b5259e9df7773cce5b35d5ee5d /lib
parent2f843a8fdb15b87d9ddb34eae37924ca940e31de (diff)
Support date shortcut 'tomorrow'
Useful for everyone who doesn't remember the current date
Diffstat (limited to 'lib')
-rw-r--r--lib/Travel/Routing/DE/EFA.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Travel/Routing/DE/EFA.pm b/lib/Travel/Routing/DE/EFA.pm
index 021a691..e5173ba 100644
--- a/lib/Travel/Routing/DE/EFA.pm
+++ b/lib/Travel/Routing/DE/EFA.pm
@@ -93,6 +93,13 @@ sub date {
my ( $day, $month, $year ) = split( /[.]/, $date );
+ if ( $date eq 'tomorrow' ) {
+ ( undef, undef, undef, $day, $month, $year )
+ = localtime( time + 86400 );
+ $month += 1;
+ $year += 1900;
+ }
+
if (
not( defined $day
and length($day)
@@ -1079,7 +1086,7 @@ Journey start time. Default: now
=item B<date> => I<DD.MM.>[I<YYYY>]
-Journey date. Default: today
+Journey date. Also accepts the string B<tomorrow>. Default: today
=item B<exclude> => \@exclude