зеркало из https://github.com/mozilla/gecko-dev.git
make calIRecurrenceInfo.getNextOccurrence not return occurences with startTime == aStartTime
bug 278149, r=vlad
This commit is contained in:
Родитель
6b7d6cec73
Коммит
14755e1b4b
|
@ -86,7 +86,7 @@ interface calIRecurrenceInfo : nsISupports
|
|||
//
|
||||
|
||||
// return the next display item for the event,
|
||||
// where the start time is >= aStartTime
|
||||
// where the start time is > aStartTime
|
||||
calIItemOccurrence getNextOccurrence (in calIDateTime aOccurrenceTime);
|
||||
|
||||
// return array of calIItemOccurrence representing all
|
||||
|
|
|
@ -141,7 +141,7 @@ calRecurrenceDate::GetNextOccurrence(calIDateTime *aStartTime,
|
|||
|
||||
if (mDate) {
|
||||
PRInt32 result;
|
||||
if (NS_SUCCEEDED(mDate->Compare(aStartTime, &result)) && result >= 0) {
|
||||
if (NS_SUCCEEDED(mDate->Compare(aStartTime, &result)) && result > 0) {
|
||||
NS_ADDREF (*_retval = mDate);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -208,7 +208,7 @@ calRecurrenceDateSet::GetNextOccurrence(calIDateTime *aStartTime,
|
|||
|
||||
// we ignore aStartTime
|
||||
for (i = 0; i < mDates.Count(); i++) {
|
||||
if (NS_SUCCEEDED(mDates[i]->Compare(aOccurrenceTime, &result)) && result >= 0) {
|
||||
if (NS_SUCCEEDED(mDates[i]->Compare(aOccurrenceTime, &result)) && result > 0) {
|
||||
NS_ADDREF (*_retval = mDates[i]);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -361,7 +361,7 @@ calRecurrenceRule::GetNextOccurrence(calIDateTime *aStartTime,
|
|||
|
||||
struct icaltimetype next = icalrecur_iterator_next(recur_iter);
|
||||
while (!icaltime_is_null_time(next)) {
|
||||
if (icaltime_compare(next, occurtime) >= 0)
|
||||
if (icaltime_compare(next, occurtime) > 0)
|
||||
break;
|
||||
|
||||
next = icalrecur_iterator_next(recur_iter);
|
||||
|
|
Загрузка…
Ссылка в новой задаче