View Single Post
Old 11-19-2024, 11:05 PM   #1039
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: 10,653
Karma: 74166147
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Stored template: colours_daysbetween()

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) <=#30 then colourC 
	fi
A shortcut template I use for column colouring, like such:

colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff')

Click image for larger version

Name:	2024-11-20 00_13_54-calibre.png
Views:	415
Size:	5.0 KB
ID:	212085

Last edited by ownedbycats; 11-19-2024 at 11:14 PM.
ownedbycats is online now   Reply With Quote