diff --git a/src/Jackett/Utils/DateTimeUtil.cs b/src/Jackett/Utils/DateTimeUtil.cs index 2c6433c95..f0a0d6dda 100644 --- a/src/Jackett/Utils/DateTimeUtil.cs +++ b/src/Jackett/Utils/DateTimeUtil.cs @@ -128,7 +128,7 @@ namespace Jackett.Utils public static Regex todayRegexp = new Regex(@"(?i)\btoday([\s,]*|$)", RegexOptions.Compiled); public static Regex tomorrowRegexp = new Regex(@"(?i)\btomorrow([\s,]*|$)", RegexOptions.Compiled); public static Regex yesterdayRegexp = new Regex(@"(?i)\byesterday([\s,]*|$)", RegexOptions.Compiled); - public static Regex missingYearRegexp = new Regex(@"^\d{1,2}-\d{1,2}(\s|$)", RegexOptions.Compiled); + public static Regex missingYearRegexp = new Regex(@"^(\d{1,2}-\d{1,2})(\s|$)", RegexOptions.Compiled); public static Regex missingYearRegexp2 = new Regex(@"^(\d{1,2}\s+\w{3})\s+(\d{1,2}\:\d{1,2}.*)$", RegexOptions.Compiled); // 1 Jan 10:30 public static DateTime FromUnknown(string str, string format = null) @@ -197,8 +197,8 @@ namespace Jackett.Utils match = missingYearRegexp.Match(str); if (match.Success) { - var date = match.Groups[0].Value; - string newDate = date+"-"+DateTime.Now.Year.ToString(); + var date = match.Groups[1].Value; + string newDate = DateTime.Now.Year.ToString()+ "-"+date; str = str.Replace(date, newDate); }