From b068dbd40ee3b4dc7d18cdcf168f0c24cea234c0 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 4 Nov 2024 19:30:00 +0800 Subject: Refactor DateUtils and merge TimeSince (#32409) Follow #32383 and #32402 --- templates/explore/repo_list.tmpl | 2 +- templates/explore/user_list.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'templates/explore') diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index d00773a963..742e83834d 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -60,7 +60,7 @@ {{end}} {{end}} -
{{ctx.Locale.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix ctx.Locale}}
+
{{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .UpdatedUnix}}
{{else}} diff --git a/templates/explore/user_list.tmpl b/templates/explore/user_list.tmpl index ff46f13c17..4128a489aa 100644 --- a/templates/explore/user_list.tmpl +++ b/templates/explore/user_list.tmpl @@ -21,7 +21,7 @@ {{.Email}} {{end}} - {{svg "octicon-calendar"}}{{ctx.Locale.Tr "user.joined_on" (ctx.DateUtils.AbsoluteShort .CreatedUnix)}} + {{svg "octicon-calendar"}}{{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}} -- cgit v1.2.3