Code Monkey home page Code Monkey logo

ical-generator's Introduction

Hi, I'm Sebbo. 👋

  • 💼 I'm currently working at @XCNT
  • 🪴 Working on a plant-manager.app in my spare time (still private)
  • 🤖 Likes to tinker with his home automation system

ical-generator's People

Contributors

1000i100 avatar andrewlane avatar b123400 avatar dependabot[bot] avatar depfu[bot] avatar ellell avatar evelynhathaway avatar fratzinger avatar github-actions[bot] avatar illidaricat avatar irfaan avatar janrg avatar jysperm avatar kesla avatar kkozlik avatar lucasfischer avatar nickcis avatar ocelotsloth avatar rubys avatar sebastiaandenboer avatar sebbo2002 avatar sedenardi avatar semantic-release-bot avatar sharathprabhal avatar sparticuz avatar spruce avatar takkaria avatar vschlattinger avatar wscourge avatar xehpuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ical-generator's Issues

attendees

Would be nice if this could support attendees.

htmlDescription not outputting

Seems like this line -
var attributes = ['id', 'uid', 'sequence', 'start', 'end', 'timezone', 'stamp', 'timestamp', 'allDay', 'floating', 'repeating', 'summary', 'location', 'description', 'organizer', 'attendees', 'alarms', 'method', 'status', 'url'],

is Missing the 'htmlDescription' attribute...so it wont output toString()

I added it-
var attributes = ['id', 'uid', 'sequence', 'start', 'end', 'timezone', 'stamp', 'timestamp', 'allDay', 'floating', 'repeating', 'summary', 'location', 'description', 'htmlDescription', 'organizer', 'attendees', 'alarms', 'method', 'status', 'url'],

Now it does.
Will do a PR.

Can't import URL to any calendar

Hi,

I've setup the first example. It works, I can download the event, but I can't feed the URL to my Google Calendar.

Is this a bug or a non-existing feature?

X-WR-CALDESC please

With google, when consuming iCalendar feeds, the iCal extension X-WR-CALNAME is ignored, but the corresponding description property X-WR-CALDESC is used for calendar description.

Can add this propertie please.

Thank you.

Problem in start/end/timestamp creation

Hi all,
I've found a problem in event.js part, where there is the date control:
(!(start instanceof Date) || !start.getTime())
it fails in case of the date 01/01/1970 00:00:00, because getTime() returns 0 that is false, even though the date is valid. It's possible to change it with a clever control or just checking only the instanceof?

Many Thanks,
eajimmy

Cancel event

attendees: {"email": "[email protected]", "name": "Person A","status": "declined"}
and also

event.status = 'cancelled';

Outlook is still showing the event

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
METHOD:REQUEST
NAME:Timeline Event Notifications
X-WR-CALNAME:Timeline Event Notifications
BEGIN:VEVENT
UID:1530526467079@http://aotasdt/
SEQUENCE:0
DTSTAMP:20180702T105939Z
DTSTART:20180703T094834Z
DTEND:20180703T095834Z
SUMMARY:Calendar Invite Title
LOCATION:Islamabad
DESCRIPTION:Lets check this module
ORGANIZER;CN="Kumail Hussain":mailto:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=DECLINED;CN="Person A":MAILTO:a@exa
mple.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=DECLINED;CN="Person B":MAILTO:b@exa
mple.com
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=DECLINED;CN="Kumail":MAILTO: kumail
[email protected]
BEGIN:VALARM
ACTION:AUDIO
TRIGGER:-PT1M
ATTACH;VALUE=URI:Basso
END:VALARM
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR

generated a invite.ics file,but no accept/decline button in email detail?

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//superman-industries.com//ical-generator//EN
METHOD:PUBLISH
NAME:My Testfeed
X-WR-CALNAME:My Testfeed
BEGIN:VEVENT
UID:[email protected]
SEQUENCE:0
DTSTAMP:20180418T080142Z
DTSTART:20180418T080142Z
DTEND:20180418T090142Z
SUMMARY:My Super Mega Awesome Event
LOCATION:shanghai
ORGANIZER;CN="西部证券":mailto:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;RSVP=TRUE;PARTSTAT=TENTATIVE;CN="qxl":MAILTO
 :[email protected]
STATUS:TENTATIVE
END:VEVENT
END:VCALENDAR

here is my ics file,use npm :ical-generator the result is like this ,the email has a invite.ics file,but no accept/decline button in email detail, if click the file, in calendar there has accept/decline button,but my boss need to see the button in email

UID contain start date

What is the reason the UID in generated ical contain the start date?

g += 'UID:' + tools.formatDate(data.start) + '-' + data.id + '@' + calendar.domain() + '\r\n';

With this it is not possible to update existing events. The updates have to have same UID. And even if I set the same uid using uid() function, the UID in generated file differs.

Error during installation

I installed the package

npm install ical-generator

gives me following error

npm ERR! Unexpected end of JSON input while parsing near '...shasum":"dd07a3c8543b'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache_logs\2018-06-29T05_40_58_347Z-debug.log
PS E:\AOTC\aotc-new> npm install ical-generator --save
npm ERR! Unexpected end of JSON input while parsing near '...shasum":"dd07a3c8543b'

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user1\AppData\Roaming\npm-cache_logs\2018-06-29T05_41_48_103Z-debug.log

Use \r\n for new lines instead of \n

This is per section 4.1 of the spec: "Content lines are delimited by a line break, which is a CRLF sequence (US-ASCII decimal 13, followed by US-ASCII decimal 10)."

It shouldn't be too big a change, and may help some clients with parsing the generated feed.

Exclude Days from Recurring Events

Awesome library! @srct is looking into including it in our project at git.gmu.edu/srct/schedules, but we need to be able to exclude individual days from the recurrence.

Looking at the library, I'm thinking it would make sense to add an array to store the date objects here (https://github.com/sebbo2002/ical-generator/blob/develop/lib/event.js#L130), and then follow that all the way out to where it is written out into the file. I've forked the repo and will probably start to figure out more clearly how to do it, but as I'm a college student it might take me a while to have time to learn the entire codebase.

In the end, it only needs to be able to generate the following format:
EXDATE:19960402T010000Z,19960403T010000Z,19960404T010000Z

Looking at the standard, here is the relevant piece:

4.8.5.1 Exception Date/Times
   Property Name: EXDATE

   Purpose: This property defines the list of date/time exceptions for a
   recurring calendar component.

   Value Type: The default value type for this property is DATE-TIME.
   The value type can be set to DATE.

   Property Parameters: Non-standard, value data type and time zone
   identifier property parameters can be specified on this property.
   Conformance: This property can be specified in an iCalendar object
   that includes a recurring calendar component.

   Description: The exception dates, if specified, are used in computing
   the recurrence set. The recurrence set is the complete set of
   recurrence instances for a calendar component. The recurrence set is
   generated by considering the initial "DTSTART" property along with
   the "RRULE", "RDATE", "EXDATE" and "EXRULE" properties contained
   within the iCalendar object. The "DTSTART" property defines the first
   instance in the recurrence set. Multiple instances of the "RRULE" and
   "EXRULE" properties can also be specified to define more
   sophisticated recurrence sets. The final recurrence set is generated
   by gathering all of the start date-times generated by any of the
   specified "RRULE" and "RDATE" properties, and then excluding any
   start date and times which fall within the union of start date and
   times generated by any specified "EXRULE" and "EXDATE" properties.
   This implies that start date and times within exclusion related
   properties (i.e., "EXDATE" and "EXRULE") take precedence over those
   specified by inclusion properties (i.e., "RDATE" and "RRULE"). Where
   duplicate instances are generated by the "RRULE" and "RDATE"
   properties, only one recurrence is considered. Duplicate instances
   are ignored.

   The "EXDATE" property can be used to exclude the value specified in
   "DTSTART". However, in such cases the original "DTSTART" date MUST
   still be maintained by the calendaring and scheduling system because
   the original "DTSTART" value has inherent usage dependencies by other
   properties such as the "RECURRENCE-ID".

   Format Definition: The property is defined by the following notation:
     exdate     = "EXDATE" exdtparam ":" exdtval *("," exdtval) CRLF
     exdtparam  = *(
                ; the following are optional,
                ; but MUST NOT occur more than once
                (";" "VALUE" "=" ("DATE-TIME" / "DATE")) /
                (";" tzidparam) /
                ; the following is optional,
                ; and MAY occur more than once
                (";" xparam)
                )
     exdtval    = date-time / date
     ;Value MUST match value type

   Example: The following is an example of this property:
     EXDATE:19960402T010000Z,19960403T010000Z,19960404T010000Z

Thanks for the awesome library by the way!

cal.createAlarm is not a function

as documented i added the alarm script to my code but getting error create alarm is not a function

`var cal = ical();

cal.setDomain('http://asp.pp/').setName('satrrer');

cal.addEvent({
start: eventObj.start,
end: eventObj.end,
summary: eventObj.title,
uid: eventObj.id, // Some unique identifier
sequence: 0,
description: eventObj.description,
location: eventObj.location,
organizer: {
name: eventObj.organiser.name,
email: eventObj.organiser.email
},
createAlarm: {type: 'display', trigger: 300},
method: 'request'
});

cal.createAlarm({type: 'display', trigger: 300})//this line throws error
cal.alarms([
{type: 'display', trigger: 600},
{type: 'audio', trigger: 300}
]);`

Test cases not using just the indicated functions

Many of the test cases are using the full calendar api, which makes it difficult to isolate individual problems. If, for example, a test case dealing with event generation directly called the generate() function it would make things much simpler to diagnose and write test cases for.

I'll be the first to admit that this is a pretty large undertaking.

htmlDescription missing from attributes in event constructor

html description for body of event not working due to the value missing in attributes array. Currently:
var attributes = ['id', 'uid', 'sequence', 'start', 'end', 'timezone', 'stamp', 'timestamp', 'allDay', 'floating', 'repeating', 'summary', 'location', 'description', 'organizer', 'attendees', 'alarms', 'method', 'status', 'url'],
vars,
i,
data;
SHOULD BE:
var attributes = ['id', 'uid', 'sequence', 'start', 'end', 'timezone', 'stamp', 'timestamp', 'allDay', 'floating', 'repeating', 'summary', 'location', 'description', 'organizer', 'attendees', 'alarms', 'method', 'status', 'url','htmlDescription'],
vars,
i,
data;

Timezones are always in East Coast format

What is the correct format for the timezone name? Using "America/Boise" which i'm getting from moment.js I should be in that timezone, but when I open this in outlook, it's in East Coast timezone:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
NAME:Demo Calendar
X-WR-CALNAME:Demo Calendar
TIMEZONE-ID:America/Boise
X-WR-TIMEZONE:America/Boise
BEGIN:VEVENT
UID:ysc6@http://localhost
SEQUENCE:0
DTSTAMP:20151218T234217Z
DTSTART:20151216T210007Z
DTEND:20151216T220007Z
SUMMARY:Awesome New Event
DESCRIPTION:ABC Company
URL;VALUE=URI:http://localhost:9999/launcher/5671db2cbeaaef790379dbe5
END:VEVENT
END:VCALENDAR

HTML support

There doesn't currently appear to be any support for adding HTML to the description field (X_ALT_DESC). Is there currently a method available to achieve this, or is that a feature that you are looking to add down the road?

ical-generator 1.0

This issue should represent the current state of the ical-generator 3.0 rebuilding…

General

  • make all the tests green again 🙈

Deployment & Distribution

  • ES6 & browserify
  • node's require, basic inline, ES6 Module ES5 Module, AMD
  • browser support
  • browser tests
  • new CI Build Pipeline
    • install
    • build (build browser, build amd, checks)
    • test (node 4+)
    • publish (npm, plato, github, github-release)
      • github
      • plato/develop
      • npm/develop
      • npm/master
      • github-release/master

Implementation

  • current basics
  • moment.js everywhere
    • should fix #38
    • should fix #49
    • should fix #52
  • Errors instead of thrown strings

Features

  • attendee roles (#65)
  • rsvp (#58)
  • alarm & category support (#22)
  • CREATED and LAST-MODIFIED (#75)
  • TypeScript Support (#71)

Tests

  • isolated tests (#54)
    • index
    • calendar
    • event
    • alarm
    • attendee
  • go throught coverage report

Last steps

Lines exceed 75-byte limit

According to the spec:

Lines of text SHOULD NOT be longer than 75 octets, excluding the line
break. Long content lines SHOULD be split into a multiple line
representations using a line "folding" technique. That is, a long
line can be split between any two characters by inserting a CRLF
immediately followed by a single linear white-space character (i.e.,
SPACE or HTAB). Any sequence of CRLF followed immediately by a
single linear white-space character is ignored (i.e., removed) when
processing the content type.

I'd be happy to make a pull-request with a fix to the generate() sections of the various class files. The simplest fix would be to format each line with

lineStr.match(/(.{1,74})/g).join('\r\n\ ')

match(/(.{1,74})/g) returns an array of 74-character long chunks of the line (74 and not 75 to take into consideration the space we're appending to the chunks), join('\r\n ') joins the chunks with a CRLF and space character, according to spec.

I haven't personally experienced any issues testing this library using Google Calendar, but I've seen bugs reported for Apple's mail client,

allDay option doesn't reflect timezone

First of all thanks for this awesome lib.
I noticed that the allday option doesn't work properly.

ical-generator uses the UTC Time to generate the full day.
In a time Zone (e.g. Europe/Berlin) this might result in a different day.

Example:

Sun May 01 2016 00:00:00 GMT+0200 (CEST)
- 2 Hours Offset // UTC Time
-------------------------------------------
= Sat Apr 30 2016 22:00:00 GMT+0200 (CEST)

Code to reproduce:

ical({
    domain: 'sebbo.net',
    prodId: '//superman-industries.com//ical-generator//EN',
    timezone: 'Europe/Berlin',
    events: [{
        start: new Date('Sun May 01 2016 00:00:00 GMT+0200 (CEST)'),
        summary: 'Example Event',
        allDay: true
    }]
});

Solution:

Normally using UTC Dates on the server is of course the right way to go.
But since the value type Date is not able to reflect the timezone properly, I suggest to use local time on this specific use case instead.

Affected Code

Quick question

Maybe i don't understand how iCal works, but my initial impression was that you create an event object and send it along as a string or invite.ics in your email.

Why does one need a server?

Any help understanding the flow is appreciated!

What client do you use for webcal/ical link ?

This is not really an issue for this project, more like a question, what client do you use to fetch your webcal/ical links ?
Thunderbird is fine since you can define the time to refresh the ical, but other apps like Google Calendar/Nextcloud/Owncloud tend to have a long cache time and are not showing updates/new events.

I use to restart my node.js script to update/add my events... maybe it's not the right thing to do, but Thunderbird is keeping up so it's working.

Why getUTC??? in _formatDate

like

coffee> d = new Date('2014-11-4')
Tue Nov 04 2014 00:00:00 GMT+0800 (CST)
coffee> d.getDate()
4
coffee> d.getUTCDate()
3

3 is wrong, why getUTCDate, not getDate?

Add an "allDay" option

e.g., if event.allDay is true, generate
DTSTART;VALUE=DATE:20140721 and DTEND;VALUE=DATE:20140721

e.g., around line 159, add

    if (e.allDay) {
       g += 'DTSTART;VALUE=DATE:' + _formatDate(e.start, true) + '\n';
       g += 'DTEND;VALUE=DATE:' + _formatDate(e.end, true) + '\n';
    }
     else {  normal code here...

CUTYPE

How do you feel about adding in CUTYPE (reference RFC)? If you like I can try my hand and creating a PR?

UTC vs Floating Time not represented

tl;dr The Problem

Currently, UTC time is the assumption when it should instead be floating time.

Important Note: This is at the event level, not the calendar level.

Example/Details

To explain let's look at the example_toString.js file and how it works/behaves:

The JavaScript / Intent

This is the relevant code in the example described above:

event = cal.createEvent({
    start: new Date(new Date().getTime() + 3600000),
    end: new Date(new Date().getTime() + 7200000),
    summary: 'Example Event',
    description: 'It works ;)',
    organizer: 'Organizer\'s Name <[email protected]>',
    url: 'http://sebbo.net/'
});

Specifically, the start and end is created with a new Date(new Date.getTime() + delay) call. These calls are done from the timezone of the computer running the code be it on a server or a user's machine.

It's important to note that this example has not defined a timezone for the event.

Because the code has not yet specified any particular timezone (be it -5 or UTC), the iCal generator should be operating in "floating" timezone mode. Looking at RFC 5545, here is where "floating" mode is defined (3.3.5):

FORM #1: DATE WITH LOCAL TIME

      The date with local time form is simply a DATE-TIME value that
      does not contain the UTC designator nor does it reference a time
      zone.  For example, the following represents January 18, 1998, at
      11 PM:

       19980118T230000

      DATE-TIME values of this type are said to be "floating" and are
      not bound to any time zone in particular.  They are used to
      represent the same hour, minute, and second value regardless of
      which time zone is currently being observed.

Basically, if we give 2pm as a time, it should store just the 2pm, and not any timezone data at all. This is not going to be the behavior that most want out of the calendar, for the very reasons we have timezones in the first place.

That said, here is what the current library generates:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
BEGIN:VEVENT
UID:[email protected]
SEQUENCE:0
DTSTAMP:20170110T023408Z
DTSTART:20170110T033408Z
DTEND:20170110T043408Z
SUMMARY:Example Event
DESCRIPTION:It still works \;)
ORGANIZER;CN="Organizer's Name":mailto:[email protected]
URL;VALUE=URI:http://sebbo.net/
END:VEVENT
END:VCALENDAR

Paying special attention to the dates, we can see that the start time is defined as 20170110T023408Z. This is in fact the correct time (I ran it at around 10pm EST). This causes some unique behavior from programs like MS Outlook, which gives a warning when it does the UTC conversion, which may not be what somebody wants in their end product.

This format is instead in the format of UTC, as defined in the RFC (3.3.5) as follows:

FORM #2: DATE WITH UTC TIME

      The date with UTC time, or absolute time, is identified by a LATIN
      CAPITAL LETTER Z suffix character, the UTC designator, appended to
      the time value.  For example, the following represents January 19,
      1998, at 0700 UTC:

       19980119T070000Z

      The "TZID" property parameter MUST NOT be applied to DATE-TIME
      properties whose time values are specified in UTC.

The Solution / Proposed Fix

I would like to see an option to support both timezones and UTC. I imagine that this could be done by assuming floating when the timezone is null and a new boolean value for UTC is set to false.

In such a system, I imagine that the library would need to throw an exception when UTC is set to true and the timezone is not null. An alternative would be to simply ignore UTC if there is a timezone set and not throw an exception.

long description will be wrap as multiple line

for example, the input is:

百色-----\n田东北-15:56\n平果-16:21\n隆安东-16:38\n南宁-17:15\n南宁东-17:31\n宾阳-18:05\n贵港-18:30\n梧州南-19:36\n郁南-19:56\n南江口-20:15\n肇庆东-20:54\n三水南-21:08\n广州南-21:39

the ouput:

DESCRIPTION:百色-----\n田东北-15:56\n平果-16:21\n隆安东-16:38\n南宁-17:15\n南宁东-17:31\n
 宾阳-18:05\n贵港-18:30\n梧州南-19:36\n郁南-19:56\n南江口-20:15\n肇庆东-20:54\n三水南-21:08\n
 广州南-21:39

gmail can't recognized the description in output file.

Recreate iCal object with String

Hello,

I'm wondering whether it's possible to do the following:

var cal = ical();    // Create a new iCalendar object
cal.createEvent(...)    // Create some events for the calendar
var str = cal.toString();    // Save the calendar to a string

// Store the string on my database

var cal = ical(str)    // Re-open the calendar from the string for editing

The reason is that I can't save the full object on my database as the functions turn into empty objects i.e.

{"addEvent":{},"clear":{},"createEvent":{},"domain":{},"events":{},"generate":{},"length":{},"name":{},"prodId":{},"save":{},"saveSync":{},"serve":{},"setDomain":{},"setName":{},"setProdID":{},"setTZ":{},"timezone":{},"toString":{}}

Attendees failing to load

Hi,

I have been trying to generate ical files with this library. However, importing them on google calendar fails to load the list of attendees, even though it shows up fine when the same ics file was sent as an email attachment instead. Here is the code,

            start: new Date('2018-03-12 20:41:00'),
            end: new Date('2018-03-12 21:54:00'),
            summary: 'summary',
            location: 'some address',
            description: 'description',
            organizer: {
                name : 'org name',
                email: 'org mail',
            },
            createAlarm : ({
                type: 'audio',
                trigger: 300, // 5min before event 
            }),
            attendees: [
                { name: 'name1', email: '[email protected]', rsvp: true },
                { name: 'name2', email: '[email protected]' }
            ]
        })

and .ics file output :

VERSION:2.0
PRODID:-//sebbo.net//ical-generator//EN
NAME:ical generator test event
X-WR-CALNAME:ical generator test event
TIMEZONE-ID:Europe/Berlin
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
UID:rtkn@localhost
SEQUENCE:0
DTSTAMP:20180311T123929Z
DTSTART:20180312T151100Z
DTEND:20180312T162400Z
SUMMARY:summary
LOCATION:some address
DESCRIPTION:description
ORGANIZER;CN="org name":mailto:org mail
ATTENDEE;ROLE=REQ-PARTICIPANT;CN="name1":MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;CN="name2":MAILTO:[email protected]
END:VEVENT
END:VCALENDAR

Any help would be appreciated.
Thanks

Question: Updating an existing ics file

I would like to know if if the .ics file saved to the disk can be updated using this package. This way we can update the events in case of rescheduling or adding more attendees at later point in time. I couldn't find an API that would read from the ics file to create a ical object so that update for same event can be done.

Error in webpack

Hi,

when trying to require ical-generator via const ical = require('ical-generator'); webpack throws the following error:

ERROR in ./~/ical-generator/lib/calendar.js
Module not found: Error: Can't resolve 'fs' in '/my-project/node_modules/ical-generator/lib'
 @ ./~/ical-generator/lib/calendar.js 411:8-21 425:15-28
 @ ./~/ical-generator/lib/index.js
 ...

Can't get it up and running 😢

Standard Time Zones

Section 3.2.19 of RFC5545 specifies a "Time Zone Identifier". Example:

 DTSTART;TZID=America/New_York:19980119T020000
 DTEND;TZID=America/New_York:19980119T030000

Ideally, this could be controlled via the existing setTZ method, but I don't think the features are compatible. Although the spec notes that there is no convention for the value of TZID, Thunderbird (for example) accepts values like "America/New_York" but rejects values like "UTC-5" (the latter being the form documented for setTZ). I think this makes the setting incompatable with the setTZ method exposed by this library.

@sebbo2002 Would you be interested in a timeZone option for addEvent? Or do you have ideas for an alternate implementation?

"\r\n " is wrongly inserted in attendee email

Hey I create event with the following code:

createGmailCalenderEVent = (options) => {
        let cal = ical();
        let event = cal.createEvent({.....})
        event.createAttendee({email: options.email, name: options.name});
        console.log(cal.toString());
    }

this is will log :

BEGIN:VCALENDAR
VERSION:2.0
....
ATTENDEE;ROLE=REQ-PARTICIPANT;CN="John Doe":MAILTO:[email protected]
 om
END:VEVENT
END:VCALENDAR

("\r\n " is wrongly inserted between ".c" and "om" )
off course i logged the options.email, name: options.name before and they looked fine,
Am I missing anything?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.