From 4bad1f8e67094de1f5802329d839dcfe9c031ab2 Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Sun, 2 Nov 2014 22:27:58 +0000 Subject: [PATCH] DatesRole: Fixing regression on singlename months --- lib/DDG/GoodieRole/Dates.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DDG/GoodieRole/Dates.pm b/lib/DDG/GoodieRole/Dates.pm index 829d8622a..3bdec34c1 100755 --- a/lib/DDG/GoodieRole/Dates.pm +++ b/lib/DDG/GoodieRole/Dates.pm @@ -473,7 +473,7 @@ sub parse_descriptive_datestring_to_date { # single named months # "january" in january means the current month # otherwise it always means the coming month of that name, be it this year or next year - return parse_datestring_to_date("01 " . $now->month() . " " . $now->year()) if lc($now->month_name()) eq lc($month); + return parse_datestring_to_date("01 " . $now->month_name() . " " . $now->year()) if lc($now->month_name()) eq lc($month); my $this_years_month = parse_datestring_to_date("01 $month " . $now->year()); $this_years_month->add(years => 1) if (DateTime->compare($this_years_month, $now) == -1); return $this_years_month;