Open pakosaan opened 7 months ago
Hey @pakosaan , you can custom the data format of the date variable in the folder name in the plugin settings
This took far too long for me to find this out - I was getting quite frustrated by the differences in Moment.js parsing between this and Templater. This seems to work, in case it's useful for anybody else - @sywhb I suggest adding a link to this in the docs and/or inline in settings: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
This allowed me to get this example:
{{#formatDate}}{{dateSaved}},"yyyy-MM-dd kkkk/'W'WW yyyy/MM yyyy/'Q'q yyyy"{{/formatDate}}
Which is equivalent to this Templater syntax using the (in standard Moment format):
<% tp.file.creation_date("YYYY-MM-DD GGGG/[W]WW YYYY/MM YYYY/[Q]Q YYYY") %>
To come out as this across both my mustachio'd Omnivore templates as well as my clean-shaven Templater template frontmatter:
2024-04-22 2024/W17 2024/04 2024/Q2 2024
Omnivore/Articles/{{{date:YYYY}}}
I wanted Omnivore/Articles/2023/