# time_format: Determine year difference based on months passed \(\#47687\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/28a9da4b326a7640704aa24996c41903f1c46365)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 28a9da4b326a7640704aa24996c41903f1c46365

Requested commit: 28a9da4b326a7640704aa24996c41903f1c46365

Commit: 28a9da4b326a7640704aa24996c41903f1c46365

Tree: b1eef5adc7cff0101f3df15057a57af762fd4cee

Author: Finn Evers

Committer: GitHub

## Message

```
time_format: Determine year difference based on months passed (#47687)

The inline git blame always calculated the difference in years for
commits based solely upon the difference between the years and not
actual time passed. This is currently somewhat unfortunate during
January, as for all dates starting from 2024 and lower, we would show `2
years ago`, even if the date was the 31st of December 2024.

This fixes/improves this to use the lower bound always instead, as I
find this much more intuitive - we can probably look into even better
formatting here at some other point.

Release Notes:

- Fixed an issue where relative time deltas would sometimes show as `n +
1 years` instead of the actual `n years`.
```

## Parents

- [c37a7ba2f6b8f6138142457249e70a8fc31b561a](https://git.cafe/gitcafe/zed/commit/c37a7ba2f6b8f6138142457249e70a8fc31b561a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/28a9da4b326a7640704aa24996c41903f1c46365?format=markdown)
