| 
			
			 | 
		#736 | |
| 
			
			
			
			 Connoisseur 
			
			![]() ![]() Posts: 63 
				Karma: 190 
				Join Date: Sep 2023 
				
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#737 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 EDIT: For consistency with field_list_count() and the new operator field_inlist (addition submitted to Kovid) I submitted a change to rename format_date_field() to field_format_date(). The old name format_date_field() is an alias and will continue to work. My intention is that any new functions and operators that work on fields will be prefixed with 'field_'. EDIT2: I might reverse the naming convention and put the _field at the end, changing field_list_count() to list_count_field(). The new operator would be inlist_field instead of field_inlist. In this case the format_date_field() wouldn't be renamed. Still thinking ... Last edited by chaley; 10-21-2024 at 07:51 PM.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#738 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,359 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Regarding format_date_field, something odd happened: I had a book today that matched all the criteria (added today, had the readinggoal tag, had a purchasesource and a non-0 cost).  
		
	
		
		
			However, when I used format_date_field() it didn't add the challenge tag. Changing it back to format_date() worked. I tested with both $date and $$date. Last edited by ownedbycats; 10-22-2024 at 11:11 AM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#739 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 EDIT: until today's change is incorporated you must use format_date_field('timestamp') instead of 'date'. Last edited by chaley; 10-22-2024 at 12:49 PM. Reason: Correction  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#740 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,359 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			ah, the timestamp/date thing. Why does that column have two separate lookups anyways? 
		
	
		
		
		
		
		
		
		
		
		
		
		
			EDIT: Looks like the pull request has already been merged in. Last edited by ownedbycats; 10-22-2024 at 01:40 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#741 | 
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			 Yes it has. One consequence: field_list_count() is now list_count_field(). You must change to the new name wherever you used the old one.
		 
		
	
		
		
		
		
		
		
		
		
		
		
		
			Last edited by chaley; 10-22-2024 at 02:19 PM. Reason: Spelling  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#742 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,359 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Yeah, I noticed my columns errored when I updated from source. Got it fixed.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#743 | 
| 
			
			
			
			 Leftutti 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 550 
				Karma: 1717097 
				Join Date: Feb 2019 
				Location: Bavaria 
				
				
				Device: iPad Pro, Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
			
			 
				
				list_count_field
			 
			
			
			I have a column #series authors (thx chaley) 
		
	
		
		
			Spoiler: 
 And I have a column symbol for more than one series author Code: 
	program: if list_count($#series_authors, ',') > 1 then 'series_authors.png' fi Code: 
	program:
	if list_count_field('#series_authors') > 1 then
		'series_authors.png'
	fi
I installed Calibre 7.20.100 but as always, I have no idea.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#744 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#745 | 
| 
			
			
			
			 Leftutti 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 550 
				Karma: 1717097 
				Join Date: Feb 2019 
				Location: Bavaria 
				
				
				Device: iPad Pro, Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Learning never stops - thank you!
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#746 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 Moderator Notice 
		Please don't double post. Your other post is sufficient. I deleted the post in this thread.  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#747 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,359 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Question: I have a stored template, colours_daysbetween(), formatted as colours_daysbetween($#lastread, '#00aaff', '#69cfff', '#9bdeff'). 
		
	
		
		
		
		
		
		
		
		
		
		
	
	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) <=# 14 then colourB elif days_between(now,date) <=# 30 then colourC fi  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#748 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#749 | 
| 
			
			
			
			 Custom User Title 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,359 
				Karma: 79528341 
				Join Date: Oct 2018 
				Location: Canada 
				
				
				Device: Kobo Libra H2O, formerly Aura HD 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			Ah yeah, I think that's what I was trying to do.  
		
	
		
		
		
		
		
		
		
		
		
		
		
			As long as I use $(field) instead of $$(raw_field) in the date argument, would that make it line up to midnight (assuming a datetime column)? Last edited by ownedbycats; 11-03-2024 at 08:13 PM.  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#750 | |
| 
			
			
			
			 Grand Sorcerer 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525 
				Karma: 8065948 
				Join Date: Jan 2010 
				Location: Notts, England 
				
				
				Device: Kobo Libra 2 
				
				
				 | 
	
	
	
		
		
		
		
		 Quote: 
	
 I also must ask: why is this precision so important? Why not let a day be 24 hours, making everything easier?  | 
|
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
            
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| Library Management: various questions not worth their own thread | ownedbycats | Library Management | 253 | 10-21-2025 09:15 AM | 
| [Metadata Source Plugin] Questions regarding parse select, docs and ref templates | Boilerplate4U | Development | 13 | 07-07-2020 03:35 AM | 
| Questions on Kobo [Interfered with another thread topic] | spdavies | Kobo Reader | 8 | 10-12-2014 12:37 PM | 
| [OLD Thread] Some questions before buying the fire. | darthreader13 | Amazon Fire | 7 | 05-10-2013 10:19 PM | 
| Thread management questions | meme | Feedback | 6 | 01-31-2011 06:07 PM |