View Single Post
Old 08-25-2013, 04:41 AM   #15
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,361
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by BetterRed View Post
Momentarily I tried to wrap my mind around how one could convert the date to a string using a template and then a regular expression on the result to express datewise comparisons - thankfully sanity prevailed
FWIW: easy to do the conversion.

Create a composite column, not tags-like. Set the sort/search type to number. The template would be
Code:
{date:format_date(yyyy)}
where "date" is the lookup name for the date you are interested in. You now have a column showing just the year for the date.

If you check the "Show in tag browser" box in the column settings then you will see each year as a separate entry in the tag browser. Click on a year to see books for that year.

NB: in calibre v1.0.0, non-text sorting on composite columns is broken. Will be fixed in the next release, or now if you run from source. It won't matter for this example unless you have books with a date < the year 1000.
chaley is offline   Reply With Quote