mirror of
https://github.com/wassname/fullcalendar.git
synced 2026-07-19 11:23:32 +08:00
v1.4.1
This commit is contained in:
+17
@@ -47,6 +47,7 @@ function addDays(d, n, keepTime) { // deals with daylight savings
|
||||
}
|
||||
return d;
|
||||
}
|
||||
fc.addDays = addDays;
|
||||
|
||||
function addMinutes(d, n) {
|
||||
d.setMinutes(d.getMinutes() + n);
|
||||
@@ -68,6 +69,22 @@ function cloneDate(d, dontKeepTime) {
|
||||
return new Date(+d);
|
||||
}
|
||||
|
||||
function zeroDate() { // returns a Date with time 00:00:00 and dateOfMonth=1
|
||||
var i=0, d;
|
||||
do {
|
||||
d = new Date(1970, i++, 1);
|
||||
} while (d.getHours() != 0);
|
||||
return d;
|
||||
}
|
||||
|
||||
function skipWeekend(date, inc, excl) {
|
||||
inc = inc || 1;
|
||||
while (date.getDay()==0 || (excl && date.getDay()==1 || !excl && date.getDay()==6)) {
|
||||
addDays(date, inc);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Date Parsing
|
||||
|
||||
Reference in New Issue
Block a user