Skip to content

Commit f746425

Browse files
committed
Drop duration
1 parent 9955b2c commit f746425

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

modules/timeutil/since.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,12 @@ func timeSinceUnix(then, now time.Time, lang translation.Locale) template.HTML {
121121
attrs := `tense="past"`
122122
isFuture := now.Before(then)
123123
if isFuture {
124-
attrs = `format="duration" tense="future"`
124+
attrs = `tense="future"`
125125
}
126126

127127
// declare data-tooltip-content attribute to switch from "title" tooltip to "tippy" tooltip
128128
htm := fmt.Sprintf(`<relative-time class="time-since" prefix="" %s datetime="%s" data-tooltip-content data-tooltip-interactive="true">%s</relative-time>`,
129129
attrs, then.Format(time.RFC3339), friendlyText)
130-
if isFuture {
131-
return template.HTML(lang.Tr("tool.from_now", htm))
132-
}
133130
return template.HTML(htm)
134131
}
135132

0 commit comments

Comments
 (0)