Bug 11120: Follow-up: adding a hint about the date format

Adding 2 hints about the expected date format to the error
message and the help.

To test:
- Run overdue_notices.pl --date <someinvaliddate>
- Run overdue_notices.pl -man
- Verify hint about date format shows up

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Katrin Fischer 2015-01-05 23:05:27 +01:00 committed by Tomas Cohen Arazi
parent 0f4a831344
commit e6d987180f

View file

@ -168,7 +168,7 @@ Choose list-all to include all overdue items in the list (limited by B<-max> set
=item B<-date>
use it in order to send overdues on a specific date and not Now.
use it in order to send overdues on a specific date and not Now. Format: YYYY-MM-DD.
=item B<-email>
@ -364,7 +364,7 @@ if ( $date_input ){
eval {
$date_to_run = dt_from_string( $date_input );
};
die "$date_input is not a valid date, aborting!"
die "$date_input is not a valid date, aborting! Use a date in format YYYY-MM-DD."
if $@ or not $date_to_run;
}