66 lines
1.5 KiB
JavaScript
66 lines
1.5 KiB
JavaScript
// Module ID: 3549
|
|
// Function ID: 3550
|
|
// Name: getOverlappingDaysInIntervals
|
|
// Dependencies: [3272, 3273]
|
|
// Exports: default
|
|
|
|
// Module 3549 (getOverlappingDaysInIntervals)
|
|
import _typeof from "_typeof";
|
|
import requiredArgs from "requiredArgs";
|
|
|
|
if (!_typeof) {
|
|
let obj = { default: null };
|
|
obj[0] = _typeof;
|
|
let tmp3 = obj;
|
|
} else {
|
|
tmp3 = _typeof;
|
|
}
|
|
let c0 = tmp3;
|
|
if (!requiredArgs) {
|
|
obj = { default: null };
|
|
obj[0] = requiredArgs;
|
|
let tmp5 = obj;
|
|
} else {
|
|
tmp5 = requiredArgs;
|
|
}
|
|
let closure_1 = tmp5;
|
|
let c2 = 86400000;
|
|
|
|
export default function getOverlappingDaysInIntervals(arg0, arg1) {
|
|
let obj = arg0;
|
|
tmp5.default(2, arguments);
|
|
if (!arg0) {
|
|
obj = {};
|
|
}
|
|
obj = arg1;
|
|
if (!arg1) {
|
|
obj = {};
|
|
}
|
|
const time = tmp3.default(obj.start).getTime();
|
|
const defaultResult1 = tmp3.default(obj.start);
|
|
const time1 = tmp3.default(obj.end).getTime();
|
|
const defaultResult2 = tmp3.default(obj.end);
|
|
let time2 = tmp3.default(obj.start).getTime();
|
|
const defaultResult3 = tmp3.default(obj.start);
|
|
let time3 = tmp3.default(obj.end).getTime();
|
|
if (time <= time1) {
|
|
if (time2 <= time3) {
|
|
if (time < time3) {
|
|
if (time2 < time1) {
|
|
if (time3 > time1) {
|
|
time3 = time1;
|
|
}
|
|
if (time2 < time) {
|
|
time2 = time;
|
|
}
|
|
const _Math = Math;
|
|
return Math.ceil((time3 - time2) / c2);
|
|
}
|
|
}
|
|
return 0;
|
|
}
|
|
}
|
|
const rangeError = new RangeError("Invalid interval");
|
|
throw rangeError;
|
|
};
|
|
export default exports.default;
|