diff --git a/NEWS.adoc b/NEWS.adoc index deb0681fb..bf89eec5b 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -12,6 +12,7 @@ Improvements: - Change the blame view to render more like `git blame`. (GH #812) - Improve worktree and submodule support. (GH #459, #781, #783) - Support running Tig via a Git alias. (GH #763) + - Use ISO-8601 letters for short relative dates. (GH #759) Bug fixes: diff --git a/src/util.c b/src/util.c index 0684a2a9b..47e8207de 100644 --- a/src/util.c +++ b/src/util.c @@ -133,12 +133,12 @@ struct reldate { static const struct reldate reldate[] = { { "second", 's', 1, 60 * 2 }, - { "minute", 'M', 60, 60 * 60 * 2 }, + { "minute", 'm', 60, 60 * 60 * 2 }, { "hour", 'h', 60 * 60, 60 * 60 * 24 * 2 }, - { "day", 'd', 60 * 60 * 24, 60 * 60 * 24 * 7 * 2 }, - { "week", 'w', 60 * 60 * 24 * 7, 60 * 60 * 24 * 7 * 5 }, - { "month", 'm', 60 * 60 * 24 * 30, 60 * 60 * 24 * 365 }, - { "year", 'y', 60 * 60 * 24 * 365, 0 }, + { "day", 'D', 60 * 60 * 24, 60 * 60 * 24 * 7 * 2 }, + { "week", 'W', 60 * 60 * 24 * 7, 60 * 60 * 24 * 7 * 5 }, + { "month", 'M', 60 * 60 * 24 * 30, 60 * 60 * 24 * 365 }, + { "year", 'Y', 60 * 60 * 24 * 365, 0 }, }; static const char * diff --git a/test/main/date-test b/test/main/date-test index d7cdfde5b..694e5f64a 100755 --- a/test/main/date-test +++ b/test/main/date-test @@ -126,30 +126,30 @@ EOF assert_equals 'relative-compact-date.screen' <