From 8612387e39e0a17c83ebc79a5dfc0039b93ce52c Mon Sep 17 00:00:00 2001 From: kaso17 Date: Sun, 18 Sep 2016 16:22:43 +0200 Subject: [PATCH] Add support for "wk" and "hr" ago format --- src/Jackett/Utils/DateTimeUtil.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Jackett/Utils/DateTimeUtil.cs b/src/Jackett/Utils/DateTimeUtil.cs index 355ae603c..fa8175ae8 100644 --- a/src/Jackett/Utils/DateTimeUtil.cs +++ b/src/Jackett/Utils/DateTimeUtil.cs @@ -42,11 +42,11 @@ namespace Jackett.Utils timeAgo += TimeSpan.FromSeconds(val); else if (unit.Contains("min")) timeAgo += TimeSpan.FromMinutes(val); - else if (unit.Contains("hour")) + else if (unit.Contains("hour") || unit.Contains("hr")) timeAgo += TimeSpan.FromHours(val); else if (unit.Contains("day")) timeAgo += TimeSpan.FromDays(val); - else if (unit.Contains("week")) + else if (unit.Contains("week") || unit.Contains("wk")) timeAgo += TimeSpan.FromDays(val * 7); else if (unit.Contains("month")) timeAgo += TimeSpan.FromDays(val * 30);