return clonedArray;\r
}\r
\r
-function schedulerGetSlots(slotSpan) {\r
- if (slotSpan == 0) slotSpan = 10;\r
- var slots = [];\r
- var d = new Date(2014, 1, 1, 0, 0, 0, 0);\r
- var i = 0;\r
- while (d.getDate() == 1) {\r
- var tmpTime = schedulerPadStr(d.getHours()) + ':' + schedulerPadStr(d.getMinutes());\r
- slots.push({ id: i, time: tmpTime });\r
- d = schedulerAddMinutes(d, slotSpan);\r
- i++;\r
- }\r
- return slots;\r
-}\r
-\r
function schedulerGetLeases(slotSpan, granularity) {\r
granularity = granularity / 60;\r
if (slotSpan == 0) slotSpan = 10;\r
return new Date(date.getTime() + minutes * 60000);\r
}\r
\r
-function schedulerCompareOnDay(dateOne, dateTwo) {\r
+/**\r
+ * Compares two dates\r
+ *\r
+ * Returns:\r
+ * 0 if they are equal\r
+ * -1 if the first is less than the second\r
+ * 1 if the first is more than the second\r
+ */\r
+function schedulerCompareOnDay(dateOne, dateTwo)\r
+{\r
if (dateOne.getYear() == dateTwo.getYear() &&\r
dateOne.getMonth() == dateTwo.getMonth() &&\r
dateOne.getDate() == dateTwo.getDate()) {\r