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

icalendar

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icalendar - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

2

lib/types.js

@@ -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]},

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