Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-01-2022, 01:12 AM   #1
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,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Sorting of months in Tag Browser

I have this as a composite column:

Code:
program:

	p = format_date ($date, 'yyyy');
	m = format_date($date, 'MMMM');

# elif so it doesn't render undefineds as '.'
	if p then strcat(p, '.', m) fi
In the tag browser, it sorts like this:

Click image for larger version

Name:	2022-09-01 02_09_54-Window.png
Views:	433
Size:	8.3 KB
ID:	196200

Is there an option to fix the sorting here, or should I just change it to output '01 (January)'?

EDIT:

Code:
program:

	p = format_date ($date, 'yyyy');
	MMMM = format_date($date, 'MMMM');
	mm = format_date($date, 'mm');
	m = strcat(mm, '(', MMMM, ')');

	if p then strcat(p, '.', m) fi
Renders '00 ({LongLocalizedMonth})' for everything. What did I mess up?

EDIT: It was the capitaliztion. 'MM', not 'mm.'

Last edited by ownedbycats; 09-01-2022 at 03:19 AM.
ownedbycats is offline   Reply With Quote
Old 09-01-2022, 08:32 AM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
I have this as a composite column:

Code:
program:

	p = format_date ($date, 'yyyy');
	m = format_date($date, 'MMMM');

# elif so it doesn't render undefineds as '.'
	if p then strcat(p, '.', m) fi
In the tag browser, it sorts like this:

Attachment 196200

Is there an option to fix the sorting here, or should I just change it to output '01 (January)'?

EDIT:

Code:
program:

	p = format_date ($date, 'yyyy');
	MMMM = format_date($date, 'MMMM');
	mm = format_date($date, 'mm');
	m = strcat(mm, '(', MMMM, ')');

	if p then strcat(p, '.', m) fi
Renders '00 ({LongLocalizedMonth})' for everything. What did I mess up?

EDIT: It was the capitaliztion. 'MM', not 'mm.'
The tag browser doesn't have sort options beyond alphabetic, by rating, or by count. Your solution is the only one I can think of.
chaley is offline   Reply With Quote
Advert
Old 09-01-2022, 03:09 PM   #3
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,970
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I've used it for sorting files/folders before, so it makes sense.
ownedbycats is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Column: Alphabetical sorting in tag browser includes articles ownedbycats Library Management 2 06-30-2020 12:52 PM
Hierarchical tags and sorting in tag browser ownedbycats Calibre 4 06-08-2020 07:01 PM
Tag Browser - Numerical sorting bonked? Lofwyr23 Calibre 3 06-14-2014 06:28 PM
Tag Browser is not sorting at all RennyM Library Management 5 05-05-2014 07:30 PM
Sorting tag values in tag browser mcam Library Management 15 08-25-2013 05:50 AM


All times are GMT -4. The time now is 11:35 AM.


MobileRead.com is a privately owned, operated and funded community.