View Single Post
Old 06-27-2024, 04:21 AM   #681
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,173
Karma: 77304081
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Question:

Code:
program:
	status = readstatus();
	times = $$#timesread;

	switch_if(
		status=='read', 'Read',
		status=='didnotfinish', 'Did Not Finish',
		status=='currentlyreading', if times >#0 then 'Currently Rereading' else 'Currently Reading' fi,
		status=='toberead', if times >#0 then 'To Be Reread' else 'To Be Read' fi,
		status=='unread', if 'readinggoal:' in $#admintags then 'Backlog' else 'Unread' fi,
		''
	)
On line 10, I'd like to change the criteria to instead check for readinggoal:{currentyear} - the obvious is just check for a literal 'readinggoal:2024' but is there a way to do this automagically?
ownedbycats is offline   Reply With Quote