[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    readDate in KLocale
From:       Jacek Stolarczyk <jacek () mer ! chemia ! polsl ! gliwice ! pl>
Date:       2002-08-06 21:36:58
[Download RAW message or body]

Hi,

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.

Regards,

Jacek Stolarczyk
-- 
jstolarz@kde.org
Coordinator of Polish translations of KDE
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic