How can get the current year in <% await tp.file.move("dailynotes/2023/dailyLogs/" + title + " dailyLogs" %>? #1434
Answered
by
Zachatoo
francisHugo
asked this question in
Help
-
Below template note,
the year 2023, can it be something to make it be replaced by 2024 automatically? TIA |
Beta Was this translation helpful? Give feedback.
Answered by
Zachatoo
Aug 21, 2024
Replies: 2 comments
-
You can use <%-*
await tp.file.move("dailynotes/" + tp.date.now("YYYY") + "/dailyLogs/" + title + " dailyLogs");
%> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
francisHugo
-
Thank you very much. it works! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use
tp.date.now()
, which you're already using in other parts of your template.