Skip to content

Commit

Permalink
Added user date formatting in footer fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
drtutut committed May 12, 2017
1 parent 7795eda commit 50b4e21
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions op-template.el
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,17 @@ similar to `op/render-header'. `op/highlight-render' is `js' or `htmlize'."
(plist-get config :uri-template) date title)))
(ht ("show-meta" (plist-get config :show-meta))
("show-comment" (plist-get config :show-comment))
("date" date)
("mod-date" (if (not filename)
(format-time-string "%Y-%m-%d")
(or (op/git-last-change-date
op/repository-directory
filename)
(format-time-string
"%Y-%m-%d"
(nth 5 (file-attributes filename))))))
("date" (funcall op/date-final-format date))
("mod-date" (funcall
op/date-final-format
(if (not filename)
(format-time-string "%Y-%m-%d")
(or (op/git-last-change-date
op/repository-directory
filename)
(format-time-string
"%Y-%m-%d"
(nth 5 (file-attributes filename)))))))
("tags" tags)
("tag-links" (if (not tags) "N/A"
(mapconcat
Expand Down

0 comments on commit 50b4e21

Please sign in to comment.