Skip to content

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
Discussion options

You must be logged in to vote

You can use tp.date.now(), which you're already using in other parts of your template.

<%-*
await tp.file.move("dailynotes/" + tp.date.now("YYYY") + "/dailyLogs/" + title + " dailyLogs");
%>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by francisHugo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants