[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kjs
From: Harri Porten <porten () kde ! org>
Date: 2005-04-17 17:21:25
Message-ID: 20050417172125.8334C488 () office ! kde ! org
[Download RAW message or body]
CVS commit by porten:
reuse helper function. the code is not identical but I am not able
to detect any behavioral difference.
M +2 -16 date_object.cpp 1.98
--- kdelibs/kjs/date_object.cpp #1.97:1.98
@@ -852,20 +852,6 @@ double KJS::KRFCDate_parseDate(const USt
if ( month == -1 ) // not found yet
{
- for(int i=0; i < 3;i++)
- {
- if (!*dateString || (*dateString == '-') || isspace(*dateString))
- return invalidDate;
- monthStr[i] = tolower(*dateString++);
- }
- monthStr[3] = '\0';
-
- newPosStr = (char*)strstr(haystack, monthStr);
-
- if (!newPosStr || (newPosStr - haystack) % 3 != 0)
- return invalidDate;
-
- month = (newPosStr-haystack)/3; // Jan=00, Feb=01, Mar=02, ..
-
- if ((month < 0) || (month > 11))
+ month = findMonth(dateString);
+ if (month == -1)
return invalidDate;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic