diff options
author | Nojus Gudinavičius <nojus.gudinavicius@gmail.com> | 2023-01-11 14:27:26 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-01-11 14:16:08 +0100 |
commit | 276c30f84d748ca639acbf5f85a37eca2425c2b3 (patch) | |
tree | 30b7d55d1545b65a61ef0e9b6828172020f0036d /lib/templates | |
parent | d73f50f272de210fe4957ff107e1ff88887f1c20 (diff) | |
download | aerc-276c30f84d748ca639acbf5f85a37eca2425c2b3.tar.gz |
templates: correctly return week format when necessary
This fixes a bug when thisDayTimeFmt was returned for both
this day and this week.
Fixes: d758441fe0c4 ("templates: add more fields and functions")
Signed-off-by: Nojus Gudinavičius <nojus.gudinavicius@gmail.com>
Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'lib/templates')
-rw-r--r-- | lib/templates/data.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/templates/data.go b/lib/templates/data.go index cb69d8fe..e34dc2f3 100644 --- a/lib/templates/data.go +++ b/lib/templates/data.go @@ -186,7 +186,7 @@ func (d *TemplateData) DateAutoFormat(date time.Time) string { case day == thisDay && d.thisDayTimeFmt != "": fmt = d.thisDayTimeFmt case day > thisDay-7 && d.thisWeekTimeFmt != "": - fmt = d.thisDayTimeFmt + fmt = d.thisWeekTimeFmt case d.thisYearTimeFmt != "": fmt = d.thisYearTimeFmt } |