Oleg.
--
Oleg Broytmann http://phd.webhost.ru/ oleg.br...@gmail.com
Programmers don't die, they just GOSUB without RETURN.
I have sent a tarball by private mail; there are class 'pdtLocale_ru' (I
don't have PyICU, should I?), patches and tests. Some of the tests passed,
some failed.
The worst problem I have is that Russian is a synthetic language[1]. In
English the root (stem) is not changed, at most there is a plural form
(day => days) and possessive case (day => day's). But in Russian words have
prefixes, suffixes, even the stem is changed.
1 day -> 1 den in Russian
2 days -> 2 dnya
3 days -> 3 dnya
4 days -> 4 dnya
5 days -> 5 dney
6 days -> 6 dney
... and so on up to 21 ...
20 days -> 20 dney
21 days -> 21 den
22 days -> 22 dnya
I haven't found a way to express this in pdtLocale_ru constants; because
of that I didn't translate some of the tests. Any help?
1. http://en.wikipedia.org/wiki/Fusional_language
Even worse is the word "god" (year) - not only it is changed - in some
forms it has a completely different stem, so it's impossible to match it
with prefix/stem/suffix matcher:
1 year -> 1 god
2 years -> 2 goda
3 years -> 3 goda
4 years -> 4 goda
5 years -> 5 let (oops!)
6 years -> 6 let
... and so on up to 21 ...
20 years -> 20 let
21 years -> 21 god
I'd be quite happy if parsedatetime would parse any form: '1 god', '1
goda', '1 let' - just give me back '+/- 1 year'.