GNOME Bugzilla – Bug 651113
[libebook] querying date fields is not supported
Last modified: 2011-09-19 09:26:34 UTC
Created attachment 188634 [details] [review] Patch proposal Hi, I'm currently working on the QtContacts backend for EDS, part of MeeGo. I noticed that it is currently not supported to query date fields such as birthday and anniversary. Since the date is store by EDS in YYYY-MM-DD format, string matching could be used. Queries such as (is "birth_date" "1984-10-26") would then be supported. Please find attached a patch proposal to implement this.
Use "make-time" function for this kind of stuff. It's used like this: (make-time "%s") where %s is usually an ISO time
I gave make-time a try but it seems it is only supported in e-cal, not in e-book. Also, because of the operators supported by EBookQuery (beginswith, endswith, contains, is), string match makes some sense. EBookQuery does not support the same date operators as e-cal (e.g. occur-in-time-range?).
You are right, I didn't read the code carefully enough. I'm sorry for that. I think your change is fine, let's commit it to master.
Would it be possible to get these patches in gnome-2-32 also? This is what is still use in MeeGo.
Created commit 37a3503 in eds master (3.1.2+)
This patch has a regression, see bug #659184