Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human readable time format related to posix #9

Open
buhtz opened this issue Jan 9, 2022 · 2 comments
Open

Human readable time format related to posix #9

buhtz opened this issue Jan 9, 2022 · 2 comments

Comments

@buhtz
Copy link

buhtz commented Jan 9, 2022

Currently I add the creation time of an org-file via date: %U.

I would like to have your modification time also as %U or another one of the datetime format string options (e.g. %Y-%m-%d %H:%M:%S).

Would be great to have a solution for that.

@tefkah
Copy link
Owner

tefkah commented Jan 11, 2022

Hmmm I'm not sure if you understand exactly what you mean: would you like to be able to add these timestamps to your org-roam-templates, and want a % string for that?

@buhtz
Copy link
Author

buhtz commented Jan 11, 2022

Yes I want to use the mtime in an org-roam-tempalte. And of course it should be updated everytime the existing org-file is modified.

Currently the result looks like this

Red, Green, Refactor

:ID:    3a59f870-f57f-4aa9-bc3e-58ca2bed7a93
:ctime: 20210911173359
:mtime: 20210929191008 20210929174704

I would like to have something like this

Red, Green, Refactor

:ID:    3a59f870-f57f-4aa9-bc3e-58ca2bed7a93
:ctime: 2021-09-11 17:33:59
:mtime: 2021-09-29 19:10:08 2021-09-29 17:47:04

Or an alternative 2021-11-20 Sa 21:14.

My default template looks is this using %U for the creation date. But I would like to add a modification date there, too.

     ("d" "default" plain  ; default incl. date
      "%?"
      :if-new (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
			 "#+title: ${title}\n+date: %U")
      :unnarrowed t)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants