Commit 7bc00392 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Support date shortcut 'tomorrow'

Useful for everyone who doesn't remember the current date
parent 2f843a8f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -521,7 +521,7 @@ route has bike support.

=item B<-d>|B<--date> I<dd>.I<mm>.[I<yyyy>]

Journey date
Journey date. Also accepts the shortcut B<tomorrow>.

=item B<-D>|B<--discover>

+8 −1
Original line number Diff line number Diff line
@@ -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