jj templates add Timestamp::since
Introduced 2026-03-04 · score 0.94
HOW TO USE IT
When a template needs a human-friendly duration between two timestamps, call `.since(start)` on the ending `Timestamp`, then call `.duration()` on the returned `TimestampRange`.
jj log -T 'self.committer().timestamp().since(self.author().timestamp()).duration()'WHY THIS HELPS
Display a human-friendly duration between timestamps in a jj template.
REQUIREMENTS AND LIMITATIONS
- Version: v0.39.0
- .since(start: Timestamp) (required): Returns the `TimestampRange` between `start` and the receiver timestamp.
- .duration() (required): Returns a human-friendly duration string for a `TimestampRange`.
- Prerequisite: Use jj v0.39.0 or later; this template method is documented in the v0.39.0 templates reference.
FIRST-PARTY EVIDENCE
- https://github.com/jj-vcs/jj/releases/tag/v0.39.0
- https://github.com/jj-vcs/jj/blob/v0.39.0/docs/templates.md
Check the installed version and the source before using it. Entry JSON