diff --git a/src/calibre/library/coloring.py b/src/calibre/library/coloring.py index 584cb01e54..e1955077b3 100644 --- a/src/calibre/library/coloring.py +++ b/src/calibre/library/coloring.py @@ -133,7 +133,7 @@ class Rule(object): # {{{ 'lt': ('1', '', ''), 'gt': ('', '', '1') }[action] - return "cmp(format_date(raw_field('%s'), 'yyyy-MM-dd'), %s, '%s', '%s', '%s')" % (col, + return "strcmp(format_date(raw_field('%s'), 'yyyy-MM-dd'), '%s', '%s', '%s', '%s')" % (col, val, lt, eq, gt) def multiple_condition(self, col, action, val, sep):