calendar-tools
Advanced tools
Comparing version 0.3.1 to 0.3.2
0.3.2 / 2011-12-21 | ||
================== | ||
* incremenet 'UNTIL' value one day | ||
* pass day week number for monthly BYDAY recurrence mode | ||
* incremenet an day to TEND for all-day event | ||
0.3.1 / 2011-12-20 | ||
@@ -3,0 +10,0 @@ ================== |
@@ -14,3 +14,3 @@ | ||
exports.version = '0.3.1'; | ||
exports.version = '0.3.2'; | ||
@@ -17,0 +17,0 @@ /** |
@@ -106,3 +106,3 @@ /*! | ||
, 'DTEND' + (ev.allDay | ||
? ';' + _str.value(options.end) | ||
? ';' + _str.value(options.end, false, ev.allDay) | ||
: ';' + _str.dateTZID(options.end, tz)) | ||
@@ -124,3 +124,3 @@ ]; | ||
if (ev.recurrence['end-by'].type == 'on') | ||
endBy = ';UNTIL=' + _str.value(ev.recurrence['end-by'].on, true); | ||
endBy = ';UNTIL=' + _str.value(ev.recurrence['end-by'].on, true, true); | ||
@@ -146,3 +146,3 @@ // INTERVAL | ||
? ';BYMONTHDAY=' + ev.start.getDate() | ||
: ';BYDAY=' + ev.start.getDate() | ||
: ';BYDAY=' + (_date.getWeekOfDay(ev.start) + 1) | ||
+ daysMapRecToRFC2445[dayNames[options.start.getDay()]]) | ||
@@ -306,3 +306,3 @@ : ''); | ||
/** | ||
* retirve all-day property from RFC2445 recurrence string | ||
* retrieve all-day property from RFC2445 recurrence string | ||
*/ | ||
@@ -309,0 +309,0 @@ |
@@ -199,3 +199,3 @@ /*! | ||
/** | ||
* Returns number of week for the date into current view | ||
* Returns week number for the date into current view | ||
* @param {Date Object} date | ||
@@ -206,3 +206,3 @@ * @return {Number} | ||
var getWeekOfDay = _date.getWeekOfDay = function (date) { | ||
return Math.floor( (date.getDate() - 1 ) / 7); | ||
return Math.floor((date.getDate() - 1 ) / 7); | ||
} | ||
@@ -448,6 +448,13 @@ | ||
* return value date adding (or not) txt label | ||
* | ||
* @param {Date} _d | ||
* @param {Boolean} noAddLabel | ||
* @param {Boolean} allDay correction | ||
*/ | ||
_string.value = function (d, noAddLabel) { | ||
var strDate = JSON.stringify(d).split('T')[0].replace(/[", -]/g, '') | ||
_string.value = function (_d, noAddLabel, allDay) { | ||
var d = new Date(_d); | ||
if(allDay) d.setDate(d.getDate() + 1); | ||
var strDate = JSON.stringify(d).split('T')[0].replace(/[", -]/g, ''); | ||
return !noAddLabel ? 'VALUE=DATE:' + strDate : strDate; | ||
@@ -454,0 +461,0 @@ }; |
{ | ||
"name": "calendar-tools" | ||
, "version": "0.3.1" | ||
, "version": "0.3.2" | ||
, "description": "Calendar object model" | ||
@@ -5,0 +5,0 @@ , "keywords": ["calendar", "google calendar", "fullCalendar", "recurring events", "icalendar", "rfc2445"] |
499983
10376