mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 11:01:25 +01:00
fix: address verified review findings (comments-views-search-1)
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
9 files changed
+68
-8
No files matched your search
@@ -88,13 +88,14 @@ func issueView(item services.Issue, repo string, dependencies services.IssueDepe
|
||||
}
|
||||
}
|
||||
|
||||
// dueText words a due date for people: "Dec 24, 2026 (in about 2 months)".
|
||||
// dueText words a due date for people: "Dec 24, 2026 (in about 2 months)". The day is the one in the
|
||||
// offset Gitea returned: it stores a due date as the end of a day in its own time zone.
|
||||
func dueText(now time.Time, raw string) string {
|
||||
due := terminal.ParseTime(raw)
|
||||
if due.IsZero() {
|
||||
return raw
|
||||
}
|
||||
return due.UTC().Format("Jan 2, 2006") + " (" + terminal.RelativeTime(now, due) + ")"
|
||||
return due.Format("Jan 2, 2006") + " (" + terminal.RelativeTime(now, due) + ")"
|
||||
}
|
||||
|
||||
// issueReferences lists issues as #N, qualifying those from other repositories.
|
||||
|
||||
Reference in new issue
Block a user