Skip to content

Commit d6e6afc

Browse files
committedMar 20, 2025
Fix cfwhen & cfsince tags when time is less than a second
Fixes #57
1 parent 48a763c commit d6e6afc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎pgcommitfest/commitfest/templatetags/commitfest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ def cf_duration_partials(d):
180180

181181
# Ignore microseconds.
182182
since = delta.days * 24 * 60 * 60 + delta.seconds
183-
if since <= 0:
183+
if since < 0:
184184
# d is in the future compared to now, stop processing.
185-
return "in the future"
185+
return None
186186

187187
# Get years and months.
188188
total_months = (now.year - d.year) * 12 + (now.month - d.month)

0 commit comments

Comments
 (0)