View Single Post
Old 01-08-2022, 08:36 PM   #274
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,053
Karma: 75568269
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I've got it.

Code:
program:

arguments(date, colourA, colourB, colourC);
now = format_date(today(), 'yyyy-MM-dd');

		if days_between(now,date) <= '1' then colourA
		elif days_between(now,date) <= '7' then colourB
		elif days_between(now,date) <= '14' then colourC fi
Code:
program:
    colours_daysbetween($#lastread, '#1c7eff', '#538fff', '#2b5aa2')
(or I could use (colourA='#1c7eff'), thoughI'm not sure there's any reason to do this unless I add more variables)

Last edited by ownedbycats; 01-08-2022 at 08:39 PM.
ownedbycats is online now   Reply With Quote