|
![]() |
|
Thread Tools | Search this Thread |
![]() |
#16 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,733
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
I just put the same template onto a test library of ~300 books, no BAD DATEs, but I have different date format settings - you could try changing yours to match - Code:
# Control how dates are displayed gui_pubdate_display_format = 'yyyy-MM-dd' gui_timestamp_display_format = 'yyyy-MM-dd hh:mm:ss' gui_last_modified_display_format = 'yyyy-MM-dd hh:mm:ss' You will need to uninstall 2.8 in order to downgrade to 2.7 - don't worry you wont lose your library or config data, but if you're anxious - back them up first. BR |
|
![]() |
![]() |
![]() |
#17 | |
Enthusiast
![]() Posts: 35
Karma: 10
Join Date: Oct 2014
Device: none
|
Quote:
mine were something like dd-MM-yyyy and now like yours yyyy-MM-dd thank you indeed helping me to solve this problem for me. all the best |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 | |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,733
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Usually when I do that I have an inkling of why I'm making the suggestion. But I don't have a logical explanation as to why changing those formats should have fixed your problem in a custom column format- but I'm glad it did. Why character formatting of a date in one place (in a tweak) should have any effect on a different character formatting of the same date in another place (custom column template) is a mystery to me. I'm tempted to suggest its a bug. BR |
|
![]() |
![]() |
![]() |
#19 | |
Enthusiast
![]() Posts: 35
Karma: 10
Join Date: Oct 2014
Device: none
|
Quote:
By the way I have changed mine to yyyy-MMM-dd in order to see the month in letters. That works too. I also wanted to test the sorting that column: yes it sorts correctly as well: year order-month order-day order ie: 2014-jan-02 2014-jan-05 2014-feb-07 2014-apr-01 |
|
![]() |
![]() |
![]() |
#20 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The problem happens because by default the template system uses the formatted versions of columns, not the underlying "real" information. This is required in order to produce formatted values. However, that means that when using the template {pubdate:format_date(yyyy)}, the format_date function sees what is displayed in calibre, e.g. Jan 2013. Format_date calls a library function (not part of calibre) that tries to work out what the original date was given the formatted value. This function can fail in what seems to be arbitrary ways, in which case format_date will produce "BAD DATE". For example, the library function apparently cannot handle "Sep 2003" but can handle "May 2003".
You can avoid this problem by using a different template Code:
program:format_date(raw_field('pubdate'), 'yyyy') |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Any way to change the title output for the catalog? | MiniMouse | Library Management | 2 | 03-02-2014 10:31 AM |
New Feature Request - Save Catalog Output Options | nynaevelan | Library Management | 0 | 02-11-2012 12:33 PM |
Calibre catalog format | skipray | Library Management | 1 | 02-17-2011 01:10 AM |
Problem making catalog ePub output | slantybard | Library Management | 6 | 02-04-2011 07:27 PM |
Calibre Catalog Output Now Flags Wishlist | Tom SKP | Library Management | 0 | 11-20-2010 09:10 AM |