From d2e57177e4f57e5a4370221886fd0d9a1499b1bc Mon Sep 17 00:00:00 2001 From: Ali Shanaakh Date: Sun, 4 Feb 2024 19:37:08 +0100 Subject: [PATCH] Fix --- pkg/portal/operation.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/portal/operation.go b/pkg/portal/operation.go index 8e38844..0435520 100644 --- a/pkg/portal/operation.go +++ b/pkg/portal/operation.go @@ -45,13 +45,13 @@ func FixDate(lexeme string) string { month := r2.ReplaceAllString(lexeme, "$2") year := r2.ReplaceAllString(lexeme, "$3") - return fmt.Sprintf("%s-%s-%s", year, month, "20"+date) + return fmt.Sprintf("%s-%s-%s", "20"+year, month, date) } if r4.MatchString(lexeme) { - date := r2.ReplaceAllString(lexeme, "$1") - month := r2.ReplaceAllString(lexeme, "$2") - year := r2.ReplaceAllString(lexeme, "$3") + date := r4.ReplaceAllString(lexeme, "$1") + month := r4.ReplaceAllString(lexeme, "$2") + year := r4.ReplaceAllString(lexeme, "$3") return fmt.Sprintf("%s-%s-%s", year, month, date) }