]> source.dussan.org Git - gitea.git/commit
Replace DateTime with proper functions (#32402)
authorwxiaoguang <wxiaoguang@gmail.com>
Sat, 2 Nov 2024 21:04:53 +0000 (05:04 +0800)
committerGitHub <noreply@github.com>
Sat, 2 Nov 2024 21:04:53 +0000 (21:04 +0000)
commit259811617ba15c77ddd89360178a59251d611af2
tree07634397779f2a9cc5be1f76fb723e80e430361a
parente524f63d58900557d7d57fc3bcd19d9facc8b8ee
Replace DateTime with proper functions (#32402)

Follow #32383

This PR cleans up the "Deadline" usages in templates, make them call
`ParseLegacy` first to get a `Time` struct then display by `DateUtils`.

Now it should be pretty clear how "deadline string" works, it makes it
possible to do further refactoring and correcting.
modules/templates/helper.go
modules/templates/util_date.go
modules/templates/util_date_test.go [new file with mode: 0644]
modules/timeutil/datetime.go
modules/timeutil/datetime_test.go [deleted file]
templates/repo/issue/milestone_issues.tmpl
templates/repo/issue/milestones.tmpl
templates/repo/issue/view_content/comments.tmpl
templates/user/dashboard/milestones.tmpl