- Copy the source code that you can find below to a file named
getDate.js
, and save it in the folder that you'll use for templater userscripts e.g.Obsidian/Templater/Scripts/getDate.js
- Go to
Settings -> Templater -> User Script Functions -> Script files folder location
and set it to your script folder e.g.Obsidian/Templater/Scripts
, then press the Refresh button.
You can use the following syntax to call the function:
<%tp.user.getDate(INPUT_DATE,YEAROFFSET,MONTHOFFSET,DAYOFFSET)%>
This would work with both positive and negative integer values as parameters.