Skip to content

Commit

Permalink
Fix hard coded year in summaries
Browse files Browse the repository at this point in the history
Fix hard coded year in summaries, which was always set to 2021.  This
may not always be correct however, since summaries can sometimes be
for the previous year if invoked in January.  Likely a change server
side should be made to return the time period for the summary along
with the data.
  • Loading branch information
LaurenceWarne committed Feb 25, 2023
1 parent 1183b66 commit c8143ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion finito.el
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ request is successful"
(overlay-put
(make-overlay (- (point) (length (number-to-string .read))) (point))
'face 'finito-summary-read)
(insert (format " books in %d and added a total of %d." 2021 .added))
(insert (format (format-time-string " books in %Y and added a total of %d.") .added))
(overlay-put
(make-overlay (1- (- (point) (length (number-to-string .added))))
(1- (point)))
Expand Down

0 comments on commit c8143ff

Please sign in to comment.