fix rendering of week 52 heading in weekly reports

This commit is contained in:
Simon Michael 2015-01-18 09:32:14 -08:00
parent 76db377468
commit 3d5b269b3d

View File

@ -114,7 +114,7 @@ showDateSpan ds@(DateSpan (Just from) (Just to)) =
-- _ | let ((fy,fw,fd), (ty,tw,td)) = (toWeekDate from, toWeekDate to) in fy==ty && fw+1==tw && fd==1 && td==1
-- -> formatTime defaultTimeLocale "%0f%gw%V" from
-- YYYY/MM/DDwN ("week N, starting on YYYY/MM/DD")
_ | let ((fy,fw,fd), (ty,tw,td)) = (toWeekDate from, toWeekDate to) in fy==ty && fw+1==tw && fd==1 && td==1
_ | let ((fy,fw,fd), (ty,tw,td)) = (toWeekDate from, toWeekDate (addDays (-1) to)) in fy==ty && fw==tw && fd==1 && td==7
-> formatTime defaultTimeLocale "%0C%y/%m/%dw%V" from
-- a day, YYYY/MM/DDd (d suffix is to distinguish from a regular date in register)
((fy,fm,fd), (ty,tm,td)) | fy==ty && fm==tm && fd+1==td -> formatTime defaultTimeLocale "%0C%y/%m/%dd" from