Quote:
Originally Posted by ownedbycats
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?
|
Try using
Code:
if 'readinggoal:' & format_date(today(), 'yyyy') in $#admintags then 'Backlog' else 'Unread' fi