Comments (2)
@lfilho from what I understand, ics.createEvent
will return an event, either via a callback, or as the actual return value. This is quite clear from the examples. The ics
object itself is not altered.
Funnily enough, I'm doing something similar:
places.list().forEach((place) => {
let c = [] // array containing ics calendar events
y.forEach((day) => {
const m = moment(day)
const e = place.rules(m)
if (e.length > 0) {
c.push({
start: [m.year(), m.month(), m.date(), 20, 0],
duration: { minutes: 120 },
title: `Tomorrow: ${e.join(' ,')}`,
description: `Don't forget to put the following trash outside : ${e.join(', ')}`
})
}
})
const { err, ical } = ics.createEvents(c)
if (!err) fs.writeFileSync(`${s.year()}/${place.id}.ics`, ical)
else console.log(`ICAL error: ${err}`)
})
ics
is just an object that exposes methods such as createEvents
, it doesn't keep any state for a given event.
from ics.
You are correct! I mis-looked the examples and I guess my brain was just expecting a stateful one haha. Thanks!
from ics.
Related Issues (20)
- Type issue for organizer attribute HOT 2
- Documentation does not cover using this package Client Side
- Calendar Side Panel in OS X Outlook?
- Callbacks and errors HOT 1
- Calendar Notifications/Alarms Not Working
- Separate calendar options from event options
- Handle organizer names with special characters correctly HOT 1
- Adding long descriptions to ICS file causes email to get lost on Outlook
- Unicode emails not passing validation check
- Faulty trigger when alert `before` is set to false.
- PARTSTAT = Accepted (and others) not working in Outlook
- Support cloudflare worker environment
- When the title contains emojis, it is unable to generate a correct summary
- Add REFRESH-INTERVAL
- Trigger is encoded twice HOT 2
- Client specific attribute X-GOOGLE-CONFERENCE HOT 1
- Allow DTSTAMP to be set like any other event attribute
- Issues with runes2 import HOT 6
- TypeError: R.object is not a function. (In 'R.object()', 'R.object' is undefined)"
- Feed not working on Google but working on Apple Calendar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ics.