Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

calendar-tools

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calendar-tools - npm Package Compare versions

Comparing version 0.3.2 to 0.3.4

62

dist/calendar-tools.js

@@ -85,3 +85,3 @@ (function () { function require(p){ var path = require.resolve(p) , mod = require.modules[path]; if (!mod) throw new Error('failed to require "' + p + '"'); if (!mod.exports) { mod.exports = {}; mod.call(mod.exports, mod, mod.exports, require.relative(path)); } return mod.exports;}require.modules = {};require.resolve = function(path){ var orig = path , reg = path + '.js' , index = path + '/index.js'; return require.modules[reg] && reg || require.modules[index] && index || orig;};require.register = function(path, fn){ require.modules[path] = fn;};require.relative = function(parent) { return function(p){ if ('.' != p.charAt(0)) return require(p); var path = parent.split('/') , segs = p.split('/'); path.pop(); for (var i = 0; i < segs.length; i++) { var seg = segs[i]; if ('..' == seg) path.pop(); else if ('.' != seg) path.push(seg); } return require(path.join('/')); };};require.register("atom.js", function(module, exports, require){

exports.version = '0.2.9';
exports.version = '0.3.2';

@@ -216,3 +216,3 @@ /**

tz = tz || options.timezone;
var tz = options.timezone;

@@ -222,6 +222,6 @@ // period: DTSTART, DTEND

'DTSTART' + (ev.allDay
? ':' + _str.value(options.start)
? ';' + _str.value(options.start)
: ';' + _str.dateTZID(options.start, tz))
, 'DTEND' + (ev.allDay
? ':' + _str.value(options.end)
? ';' + _str.value(options.end, false, ev.allDay)
: ';' + _str.dateTZID(options.end, tz))

@@ -243,3 +243,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);

@@ -264,5 +264,5 @@ // INTERVAL

? (ev.recurrence['repeat-on'].mode == 'day-of-month'
? ';BYMONTHDAY=1'
: ';BYDAY=1'
+ daysMapRecToRFC2445[dayNames[options._start.getDay()]])
? ';BYMONTHDAY=' + ev.start.getDate()
: ';BYDAY=' + (_date.getWeekOfDay(ev.start) + 1)
+ daysMapRecToRFC2445[dayNames[options.start.getDay()]])
: '');

@@ -320,3 +320,3 @@ break;

// debug: RFC2445 \x1B[0;33m%s\x1B[0m string to recurrence object, str
var recRule = str.match(/RRULE([^ ]+)/)
var recRule = str.match(/RRULE(.+)/)
, recObj = {

@@ -386,4 +386,4 @@ every: 1

// BYMONTHDAY/repeat-on. Used for:
// - weekly mode
else if (prp[0] == 'BYMONTHDAY' && prp[1] == 1)
// - monthly mode
else if (prp[0] == 'BYMONTHDAY')
recObj['repeat-on'].mode = 'day-of-month';

@@ -427,3 +427,3 @@

/**
* retirve all-day property from RFC2445 recurrence string
* retrieve all-day property from RFC2445 recurrence string
*/

@@ -462,12 +462,2 @@

/**
* timezone correction
* @param {Number} tz
*/
function tzCorrection (date, tz) {
return date = new Date(+date - tz * _hour);
}
/**

@@ -539,3 +529,3 @@ * date usefull functions *

/**
* Apply timezone diff correctio
* Apply timezone diff correction
*/

@@ -548,3 +538,3 @@

if (tzdiff)
date.setMinutes(date.getMinutes() + tzdiff * sign)
date.setMinutes(date.getMinutes() + tzdiff * sign);

@@ -651,3 +641,3 @@ return date;

/**
* Returns number of week for the date into current view
* Returns week number for the date into current view
* @param {Date Object} date

@@ -658,3 +648,3 @@ * @return {Number}

var getWeekOfDay = _date.getWeekOfDay = function (date) {
return Math.floor( (date.getDate() - 1 ) / 7);
return Math.floor((date.getDate() - 1 ) / 7);
}

@@ -900,6 +890,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;

@@ -1524,3 +1521,12 @@ };

, repOn = ev.recurrence['repeat-on']
, count = 0;
for (var k in repOn)
count++;
if (!repOn || !count) {
jumpingVector[ev.start.getDay()] = 7 * ev.recurrence.every;
return this.jumpingVector = jumpingVector;
}
// build repeat on Array

@@ -1527,0 +1533,0 @@ // contains all days sorting by day number

0.3.4 / 2012-01-04
==================
* restoring getRecurrenceObj build proccess
* apply new repeat-on control for jumping vector
0.3.3 / 2012-01-04
==================
* weekly mode: set default start day when is undefined from ical
* change rrule detection
0.3.2 / 2011-12-21

@@ -3,0 +15,0 @@ ==================

@@ -14,3 +14,3 @@

exports.version = '0.3.2';
exports.version = '0.3.4';

@@ -17,0 +17,0 @@ /**

@@ -198,3 +198,3 @@ /*!

// debug: RFC2445 \x1B[0;33m%s\x1B[0m string to recurrence object, str
var recRule = str.match(/RRULE([^ ]+)/)
var recRule = str.match(/RRULE(.+)/)
, recObj = {

@@ -201,0 +201,0 @@ every: 1

@@ -438,3 +438,12 @@ /*!

, repOn = ev.recurrence['repeat-on']
, count = 0;
for (var k in repOn)
count++;
if (!repOn || !count) {
jumpingVector[ev.start.getDay()] = 7 * ev.recurrence.every;
return this.jumpingVector = jumpingVector;
}
// build repeat on Array

@@ -441,0 +450,0 @@ // contains all days sorting by day number

{
"name": "calendar-tools"
, "version": "0.3.2"
, "version": "0.3.4"
, "description": "Calendar object model"

@@ -5,0 +5,0 @@ , "keywords": ["calendar", "google calendar", "fullCalendar", "recurring events", "icalendar", "rfc2445"]

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc