View Single Post
Old 01-07-2022, 04:21 AM   #271
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
You can pass variables to stored templates using the arguments function (read the documentation for more info)
  • You should first modify your stored templates to look like this
    Code:
    program:
        arguments(date);
        now = format_date(today(), 'yyyy-MM-dd');
    
        if days_between(date, now) <= '1' then '#aaaaa'
        elif days_between(date, now) <= '3' then '#bbbbb'
        elif days_between(date, now) <= '7' then '#ccccc' 
        fi
  • Now you can call the stored template with the date argument as follows:
    Code:
    program:
        colours_daysbetween($#fanficupdated)
capink is offline   Reply With Quote