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>
1 files changed, 1 insertions(+), 1 deletions(-) M lib/templates/data.go
M lib/templates/data.go => lib/templates/data.go +1 -1
@@ 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 }