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 10-31-2014, 04:11 AM   #16
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,733
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by millan View Post
Do you think it might be something to do with my installation of the Calibre's new update I have installed today?
Well if it was OK before you did the update then yes, but it I doubt it was anything you did

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 can download 2.7 from here http://download.calibre-ebook.com/2.7.0/

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
BetterRed is online now   Reply With Quote
Old 10-31-2014, 04:22 AM   #17
millan
Enthusiast
millan began at the beginning.
 
millan's Avatar
 
Posts: 35
Karma: 10
Join Date: Oct 2014
Device: none
Quote:
Originally Posted by BetterRed View Post
Well if it was OK before you did the update then yes, but it I doubt it was anything you did

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 can download 2.7 from here http://download.calibre-ebook.com/2.7.0/

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
Amazing, it works now after changing the formats
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
millan is offline   Reply With Quote
Advert
Old 10-31-2014, 06:18 AM   #18
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,733
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by millan View Post
Amazing, it works now after changing the formats
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
@millan - Hmmm, well my suggestion was a very long shot in the dark.

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
BetterRed is online now   Reply With Quote
Old 10-31-2014, 07:22 AM   #19
millan
Enthusiast
millan began at the beginning.
 
millan's Avatar
 
Posts: 35
Karma: 10
Join Date: Oct 2014
Device: none
Quote:
Originally Posted by BetterRed View Post
@millan - Hmmm, well my suggestion was a very long shot in the dark.

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
Please do so and or test my earlier settings for yourself, just in case as well.
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
millan is offline   Reply With Quote
Old 10-31-2014, 08:07 AM   #20
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,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')
This template works because raw_field fetches the underlying value, not the formatted value.
chaley is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
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


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


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