Quote:
Originally Posted by mijkala
I'm using an action chain to clean up my status section for fics and it's been working well, until I noticed one that won't change? Here's the code I have for both
Code:
program:
now = format_date(today(),'iso');
updated = $$#ao3_last_updated;
status = $#status;
if
status=='In-Progress'
&& days_between(now, updated) ># 183
then
'Dormant'
elif
status=='In-Progress'
&& days_between(now, updated) ># 900
then
'Hiatus'
else
status
fi
|
Of note:
- The only check that will succeed is "># 183". Both 500 and 1000 are larger than 183. You should reverse the two checks to look for "># 900" first.
- today() returns an ISO formatted date. You don't need to format it again.
As for why the fic isn't updated, I suspect that #ao3_last_updated doesn't contain what you think or is formatted in some way where the conversion of the string to a date/time is failing. Without seeing the actual metadata in the library for the book we can't say any more. The book itself isn't relevant.