NewsStats.pm: Warn when -p takes precedence over -m.
authorThomas Hochstein <thh@inter.net>
Fri, 17 Sep 2010 20:26:56 +0000 (22:26 +0200)
committerThomas Hochstein <thh@inter.net>
Sat, 18 Sep 2010 18:45:18 +0000 (20:45 +0200)
Signed-off-by: Thomas Hochstein <thh@inter.net>
NewsStats.pm

index ed76737..34635c1 100644 (file)
@@ -200,6 +200,8 @@ sub GetTimePeriod {
   my ($Month,$Period) = @_;
   # exit if -m is set and not like YYYY-MM
   die "$MySelf: E: Wrong date format - use '$MySelf -m YYYY-MM'!\n" if not &CheckMonth($Month);
+  # warn if -m and -p is set
+  warn "$MySelf: W: Time period assigned by '-p' takes precendece over month assigned by '-m'.\n" if ($Month && $Period);
   # default: set -m to last month
   $Month = &LastMonth if (!defined($Month) and !defined($Period));
   # set $StartMonth, $EndMonth
This page took 0.01167 seconds and 4 git commands to generate.