Comparing version 0.1.0 to 0.2.0
@@ -85,4 +85,8 @@ // Generated by CoffeeScript 1.7.1 | ||
VComponent.prototype.formatIcalDate = function(date) { | ||
return moment(date).format('YYYYMMDDTHHmm00'); | ||
VComponent.prototype.formatIcalDate = function(date, wholeDay) { | ||
if (wholeDay) { | ||
return moment(date).format('YYYYMMDD'); | ||
} else { | ||
return moment(date).format('YYYYMMDDTHHmm00'); | ||
} | ||
}; | ||
@@ -175,8 +179,6 @@ | ||
function VEvent(startDate, endDate, summary, location, uid, description) { | ||
function VEvent(startDate, endDate, summary, location, uid, description, wholeDay) { | ||
VEvent.__super__.constructor.apply(this, arguments); | ||
this.fields = { | ||
SUMMARY: summary, | ||
"DTSTART;VALUE=DATE-TIME": this.formatIcalDate(startDate) + 'Z', | ||
"DTEND;VALUE=DATE-TIME": this.formatIcalDate(endDate) + 'Z', | ||
LOCATION: location, | ||
@@ -188,2 +190,9 @@ UID: uid | ||
} | ||
if (wholeDay) { | ||
this.fields["DTSTART;VALUE=DATE"] = this.formatIcalDate(startDate, wholeDay); | ||
this.fields["DTEND;VALUE=DATE"] = this.formatIcalDate(endDate, wholeDay); | ||
} else { | ||
this.fields["DTSTART;VALUE=DATE-TIME"] = this.formatIcalDate(startDate) + 'Z'; | ||
this.fields["DTEND;VALUE=DATE-TIME"] = this.formatIcalDate(endDate) + 'Z'; | ||
} | ||
} | ||
@@ -190,0 +199,0 @@ |
{ | ||
"name": "cozy-ical", | ||
"version": "0.1.0", | ||
"description": "Cozy-Ical provides ICal Parser, Writer and Helperss", | ||
"version": "0.2.0", | ||
"description": "Cozy-Ical provides ICal Parser, generators and helpers", | ||
"main": "lib/index.js", | ||
@@ -22,4 +22,14 @@ "scripts": { | ||
], | ||
"author": "Cozy", | ||
"license": "see LICENSE", | ||
"author": "Cozy Cloud <contact@cozycloud.cc> (http://cozycloud.cc)", | ||
"contributors": [ | ||
"Romain Foucault", | ||
"Oleg Elifantiev", | ||
"Frank Rousseau" | ||
], | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/mycozycloud/cozy-ical/blob/master/LICENSE" | ||
} | ||
], | ||
"readmeFilename": "README.md", | ||
@@ -26,0 +36,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
44858
0
494