PKM-er / obsidian-zotlit

A third-party project that aims to facilitate the integration between Obsidian.md and Zotero, by providing a set of community plugins for both Obsidian and Zotero.
https://zotlit.aidenlx.top
MIT License
632 stars 28 forks source link

[Feature request] Access to moment inside templates #191

Closed RyotaUshio closed 11 months ago

RyotaUshio commented 11 months ago

Hi, thank you for this awesome plugin!

In Zotero, the date field sometimes contains the full date (YYYY-MM-DD), but sometimes only the year only (YYYY). But I want to include year as a property in my literature note, regardless of the date format given by Zotero.

So basically, what I want is something like the format() nunjacks filter that is available in Zotero Integration: https://github.com/mgmeyers/obsidian-zotero-integration/blob/main/docs/Templating.md#formatmoment-format

If we have access to mementinside templates, we can do this by

year: <%= moment(it.date).format('YYYY') %>

This is why I would love this feature. Thank you!

RyotaUshio commented 11 months ago

I'm very sorry, I somehow misunderstood and didn't realize it's already possible.