/usr/lib/thunderbird-addons/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calPeriod.js is in xul-ext-lightning 1:24.4.0+build1-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Components.utils.import("resource://calendar/modules/ical.js");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
function calPeriod(innerObject) {
this.innerObject = innerObject || new ICAL.Period({});
this.wrappedJSObject = this;
}
const calPeriodInterfaces = [Components.interfaces.calIPeriod];
const calPeriodClassID = Components.ID("{394a281f-7299-45f7-8b1f-cce21258972f}");
calPeriod.prototype = {
QueryInterface: XPCOMUtils.generateQI(calPeriodInterfaces),
classID: calPeriodClassID,
classInfo: XPCOMUtils.generateCI({
contractID: "@mozilla.org/calendar/period;1",
classDescription: "A period between two dates",
classID: calPeriodClassID,
interfaces: calPeriodInterfaces
}),
isMutable: true,
innerObject: null,
get icalPeriod() this.innerObject,
set icalPeriod(val) this.innerObject = val,
makeImmutable: function() this.isMutable = false,
clone: function() new calPeriod(ICAL.Period.fromData(this.innerObject)),
get start() wrapGetter(calDateTime, this.innerObject.start),
set start(val) unwrapSetter(ICAL.Time, val, function(val) {
this.innerObject.start = val;
}, this),
get end() wrapGetter(calDateTime, this.innerObject.getEnd()),
set end(val) unwrapSetter(ICAL.Time, val, function(val) {
if (this.innerObject.duration) {
this.innerObject.duration = null;
}
this.innerObject.end = val;
}, this),
get duration() wrapGetter(calDuration, this.innerObject.getDuration()),
get icalString() this.innerObject.toICALString(),
set icalString(val) {
let str = ICAL.parse._parseValue(val, "period");
this.innerObject = ICAL.Period.fromString(str);
return val;
},
toString: function() this.innerObject.toString()
};
|