Parsing a user-entered localized datetime
dsteckel at ulb.ac.be
Wed Apr 10 15:41:34 BST 2013
I am a student applying for this year's Google Summer of Code, to work
Nepomuk. The project that interests me is a real "query parser" for
search queries. For instance, the user can use Dolphin to find
"one year ago", containing "KDE and openSuSE", or having a certain tag.
I have already some spare time to work on this project and I want to
investigating some of the problems I will face during the summer. One
of them is
parsing a user-entered datetime, like in the example above. A quick
the KDE and Qt documentation pointed me to KCalendarSystem::readDate.
Unfortunately, this method does not seem to be able to parse
datetimes, for instance "last monday on 8:45" or "this morning".
Is there any class that I have missed and that does something like that
there isn't any, where could I contribute this kind of parser (in a
class in KDE Libs or by extending KCalendarSystem::readDate) ? I have
some ideas about how I could implement it, but I am still thinking
about how to
allow translators to provide locale-specific parsing rules. It can be a
translation of "X days ago" in another language, or even parsing rules
to other calendar systems. Does KDE store its locale-specific settings
that can be easily edited by translators ?
My native language is French, so I can ensure that the parser will be
parse English and French dates, but I don't know any calendar system
the Gregorian one.
More information about the kde-core-devel