Fixes bug 374772 (Length of all day events,r=lilmatt) and bug 375201 (typo in attribute,r=jminta)

This commit is contained in:
mozilla%kewis.ch 2007-03-29 18:43:41 +00:00
Родитель bd1228fe59
Коммит 2e074a0f0a
2 изменённых файлов: 4 добавлений и 17 удалений

Просмотреть файл

@ -65,7 +65,7 @@ function calGoogleCalendar() {
};
}
var prefAttrs = ["name", "supressAlarms"];
var prefAttrs = ["name", "suppressAlarms"];
for each (var attr in prefAttrs) {
var helper = new calAttrHelper(attr);
this.__defineGetter__(attr, helper.getAttr);

Просмотреть файл

@ -484,22 +484,9 @@ function ItemToXMLEntry(aItem, aAuthorEmail, aAuthorName) {
var duration = aItem.endDate.subtractDate(aItem.startDate);
entry.gd::when.@startTime = toRFC3339(aItem.startDate);
if ((aItem.startDate.isDate && duration.days > 1) ||
(!aItem.startDate.isDate && duration != "PT0S")) {
// Multiple Day, All Day events need an end time
// Events with a time need an end time
// Zero Duration Events do NOT need an end time
// One Day, All Day events do NOT need an end time
var endDate = aItem.endDate.clone();
if (aItem.startDate.isDate && duration.days > 1) {
// sunbird sets the end date to 00:00:00 on the day after the event
// ends, google wants the last day of the event
endDate.day--;
endDate.normalize();
}
entry.gd::when.@endTime = toRFC3339(endDate);
if (duration != "PT0S") {
// Zero Duration Events must not have an end time
entry.gd::when.@endTime = toRFC3339(aItem.endDate);
}
// gd:visibility