aboutsummaryrefslogtreecommitdiffstats
path: root/modules/timeutil
diff options
context:
space:
mode:
authorYarden Shoham <git@yardenshoham.com>2023-04-29 23:51:43 +0300
committerGitHub <noreply@github.com>2023-04-29 22:51:43 +0200
commitcc84c58aff30281d7f3cc6baca80e6983e35c859 (patch)
treec741bba8dee929f78d774a63b0896571829b8b3f /modules/timeutil
parenta18919bba6e7f56572b782ce00285960accbde87 (diff)
downloadgitea-cc84c58aff30281d7f3cc6baca80e6983e35c859.tar.gz
gitea-cc84c58aff30281d7f3cc6baca80e6983e35c859.zip
Remove unused setting `time.FORMAT` (#24430)
It's loaded and then never used. --------- Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules/timeutil')
-rw-r--r--modules/timeutil/language.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/modules/timeutil/language.go b/modules/timeutil/language.go
deleted file mode 100644
index c2f7a0e579..0000000000
--- a/modules/timeutil/language.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2019 The Gitea Authors. All rights reserved.
-// SPDX-License-Identifier: MIT
-
-package timeutil
-
-import (
- "time"
-
- "code.gitea.io/gitea/modules/setting"
-)
-
-var langTimeFormats = map[string]string{
- "zh-CN": "2006年01月02日 15时04分05秒",
- "en-US": time.RFC1123,
- "lv-LV": "02.01.2006. 15:04:05",
-}
-
-// GetLangTimeFormat represents the default time format for the language
-func GetLangTimeFormat(lang string) string {
- return langTimeFormats[lang]
-}
-
-// GetTimeFormat represents the
-func GetTimeFormat(lang string) string {
- if setting.TimeFormat == "" {
- format := GetLangTimeFormat(lang)
- if format == "" {
- format = time.RFC1123
- }
- return format
- }
- return setting.TimeFormat
-}