Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dates not working #64

Open
Amparose opened this issue Feb 10, 2024 · 2 comments
Open

Dates not working #64

Amparose opened this issue Feb 10, 2024 · 2 comments

Comments

@Amparose
Copy link

Various date properties are just pushing the current date/time instead of the relevant date/time. I have this in my template:

Last Highlight: {{date ZANNOTATIONMODIFICATIONDATE "YYYY/MM/DDTHH:mm:ss "}}
Date Finished: {{date ZDATEFINISHED "YYYY/MM/DDTHH:mm:ss" }}

Both don't work. Also, I tried on a book that isn't finished and it still puts in the current date/time.

@bingryan
Copy link
Owner

Various date properties are just pushing the current date/time instead of the relevant date/time. I have this in my template:

Last Highlight: {{date ZANNOTATIONMODIFICATIONDATE "YYYY/MM/DDTHH:mm:ss "}}
Date Finished: {{date ZDATEFINISHED "YYYY/MM/DDTHH:mm:ss" }}

Both don't work. Also, I tried on a book that isn't finished and it still puts in the current date/time.

template:

---
book: {{library.ZSORTTITLE}}
author: {{library.ZAUTHOR}}
language: {{library.ZLANGUAGE}}
library.ZLASTOPENDATE: {{ library.ZLASTOPENDATE }}
last_opened: {{library.ZLASTOPENDATE}}
last_opened_dateFormat: {{dateFormat library.ZLASTOPENDATE "YYYY/MM/DDTHH:mm:ss" }}

library.ZANNOTATIONMODIFICATIONDATE: {{ library.ZANNOTATIONMODIFICATIONDATE }}
last_opened: {{dateFormat library.ZLASTOPENDATE "YYYY/MM/DDTHH:mm:ss" }}
last_highlight: {{dateFormat library.ZANNOTATIONMODIFICATIONDATE "YYYY/MM/DDTHH:mm:ss "}}
tags:
- highlights/iBooks
---


# 📔 Book: {{library.ZSORTTITLE}}

**Author**:: {{library.ZAUTHOR}}

**LANGUAGE**:: {{library.ZLANGUAGE}}

**Book Link**:: [Apple Books Link](ibooks://assetid/{{library.ZASSETID}})

{{#if library.ZBOOKDESCRIPTION}}
---
# 🧾 Description
	{{{library.ZBOOKDESCRIPTION}}}
{{/if}}

---
# 🔍 How I Discovered IT

{{#group annotation by="ZFUTUREPROOFING5"}}
- 📚{{value}}
	{{#each items}}
	{{#if ZANNOTATIONSELECTEDTEXT}}
	{{#is ZANNOTATIONSTYLE 5}}
	- 🎯 <mark style="background: #C4B3D9;">{{ZANNOTATIONSELECTEDTEXT}}</mark>
	{{/is}}
	{{#is ZANNOTATIONSTYLE 4}}
	- 🎯 <mark style="background: #E6A5AB;">{{ZANNOTATIONSELECTEDTEXT}}</mark>
	{{/is}}
	{{#is ZANNOTATIONSTYLE 3}}
	- 🎯 <mark style="background: #EDD570;">{{ZANNOTATIONSELECTEDTEXT}}</mark>
	{{/is}}
	{{#is ZANNOTATIONSTYLE 2}}
	- 🎯 <mark style="background: #A8BADE;">{{ZANNOTATIONSELECTEDTEXT}}</mark>
	{{/is}}
	{{#is ZANNOTATIONSTYLE 1}}
	- 🎯 <mark style="background: #B0D17F;">{{ZANNOTATIONSELECTEDTEXT}}</mark>
	{{/is}}
	{{#is ZANNOTATIONSTYLE 0}}
	- 🎯 <mark style="background: #E65747;">{{ZANNOTATIONSELECTEDTEXT}}</mark>
	{{/is}}
	{{/if}}
		{{#if ZANNOTATIONNOTE}}
		- ✍️{{ZANNOTATIONNOTE}}
		{{/if}}
	{{/each}}
{{/group}}

@Amparose
Copy link
Author

Thanks for following up but I get "last_highlight: Invalid date" when I use:

last_highlight: {{dateFormat library.ZANNOTATIONMODIFICATIONDATE "YYYY/MM/DDTHH:mm:ss "}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants