Bug 11120: Follow-up: adding a hint about the date format
authorKatrin Fischer <Katrin.Fischer.83@web.de>
Mon, 5 Jan 2015 22:05:27 +0000 (23:05 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 30 Mar 2015 16:43:52 +0000 (13:43 -0300)
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>
misc/cronjobs/overdue_notices.pl

index 95d04b1..c9c2d69 100755 (executable)
@@ -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;
 
 }