readDate in KLocale

Jacek Stolarczyk jacek at
Tue Aug 6 22:36:58 BST 2002


Is there any specific reason why "for" loops are used for month names and day 
names? (instead of "while"). Unless I'm missing something here it looks 
rather inefficient.

example snippet:
error = true;
for (int j = 1; j < 8; j++) {
  QString s = weekDayName(j, c == 'a').lower();
  int len = s.length();
  if (str.mid(strpos, len) == s)
    strpos += len;
    error = false;

I've written a patch to KLocale (adding implementation of possessive forms of 
month names in dates) so I can take care the problem above and post an 
extended patch here for review. Most probably on Thursday, my patch needs 
more testing, otherwise users of languages without noun declension would be 
rather perplexed.


Jacek Stolarczyk
jstolarz at
Coordinator of Polish translations of KDE

More information about the kde-core-devel mailing list