зеркало из https://github.com/mozilla/gecko-dev.git
make adding a duration be done in parts, instead of converting to seconds.
bug 303826, r=dmose
This commit is contained in:
Родитель
127b2f38f1
Коммит
85a524e5d5
|
@ -310,9 +310,11 @@ int icaldurationtype_is_bad_duration(struct icaldurationtype d)
|
|||
struct icaltimetype icaltime_add(struct icaltimetype t,
|
||||
struct icaldurationtype d)
|
||||
{
|
||||
int dt = icaldurationtype_as_int(d);
|
||||
|
||||
t.second += dt;
|
||||
t.second += d.seconds;
|
||||
t.minute += d.minutes;
|
||||
t.hour += d.hours;
|
||||
t.day += d.days;
|
||||
t.day += d.weeks * 7;
|
||||
|
||||
t = icaltime_normalize(t);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче