Comparing version 0.3.1 to 0.3.2
@@ -135,3 +135,3 @@ // Copyright (C) 2011 Tri Tech Computers Ltd. | ||
parse: function(value) { | ||
var match = /P(\d+W)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+S)?)/.exec(value).slice(1); | ||
var match = /P(\d+W)?(\d+D)?(?:T(\d+H)?(\d+M)?(\d+S)?)?/.exec(value).slice(1); | ||
var mul = [ 60*60*24*7, 60*60*24, 60*60, 60, 1 ]; | ||
@@ -138,0 +138,0 @@ var dur = 0; |
{ | ||
"name": "icalendar", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"author": "James Emerton <james@tri-tech.com>", | ||
@@ -5,0 +5,0 @@ "description": "RFC5545 iCalendar parser/generator", |
@@ -65,4 +65,14 @@ | ||
assert.equal(60*60*24*7 + 60*60*24*2 + 60*60*3 + 60*4 + 5, | ||
icalendar.parse_value('DURATION', 'P1W2DT3H4M5S')); | ||
expect(icalendar.parse_value('DURATION', 'P1W2DT3H4M5S')) | ||
.toEqual(60*60*24*7 + 60*60*24*2 + 60*60*3 + 60*4 + 5); | ||
expect(icalendar.parse_value('DURATION', 'P1W')) | ||
.toEqual(60*60*24*7); | ||
expect(icalendar.parse_value('DURATION', 'P1D')) | ||
.toEqual(60*60*24); | ||
expect(icalendar.parse_value('DURATION', 'PT1H')) | ||
.toEqual(60*60); | ||
expect(icalendar.parse_value('DURATION', 'PT1M')) | ||
.toEqual(60); | ||
expect(icalendar.parse_value('DURATION', 'PT1S')) | ||
.toEqual(1); | ||
@@ -69,0 +79,0 @@ assert.deepEqual({FREQ: 'YEARLY', BYMONTH: 11, BYDAY: [1,0]}, |
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
150956
1421