Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shal committed Feb 4, 2024
1 parent 9f12929 commit d2e5717
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/portal/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit d2e5717

Please sign in to comment.