From 6fa76e85c4ff6aacffd5aa668128cef1723e24c6 Mon Sep 17 00:00:00 2001 From: Ske Date: Sun, 21 Jun 2020 16:07:14 +0200 Subject: [PATCH] Make duration parsing case-insensitive --- PluralKit.Core/Utils/DateUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PluralKit.Core/Utils/DateUtils.cs b/PluralKit.Core/Utils/DateUtils.cs index 0f917f1a..84c323da 100644 --- a/PluralKit.Core/Utils/DateUtils.cs +++ b/PluralKit.Core/Utils/DateUtils.cs @@ -15,7 +15,7 @@ namespace PluralKit.Core foreach (Match match in Regex.Matches(str, "(\\d{1,6})(\\w)")) { var amount = int.Parse(match.Groups[1].Value); - var type = match.Groups[2].Value; + var type = match.Groups[2].Value.ToLowerInvariant(); if (type == "w") d += Duration.FromDays(7) * amount; else if (type == "d") d += Duration.FromDays(1) * amount;