Comments (5)
Nope. This is a bug. I spent a couple of hours on this since I am very new to JavaScript.
Do this under ics.js, and it will work fine:
//var start_seconds = ("00" + (start_date.getMinutes().toString())).slice(-2); //original
var start_seconds = ("00" + (start_date.getSeconds().toString())).slice(-2); //added by Syahmul
//var end_seconds = ("00" + (end_date.getMinutes().toString())).slice(-2); //original
var end_seconds = ("00" + (end_date.getSeconds().toString())).slice(-2); //added by Syahmul
To the one who is maintaining this repo, you may want to fix this bug as suggested here, and I hope it helps. :)
from ics.js.
It's not just that he is using .getMinutes() instead of .getSeconds his test also forgets the hours.
karanveerm is exactly right if you change the code it does work but I also have not tested it exhaustively.
Cost me as much time as this library saved me.
from ics.js.
I just created a pull request to fix this issue with solution suggested by @karanveerm.
@nwcell can you check? thanks
from ics.js.
So it's been 2 years since last post, but following change worked for me 👍
// if (start_minutes + start_minutes + start_seconds + end_minutes + end_seconds != 0) {
if (start_hours +start_minutes + start_minutes + start_seconds + end_minutes + end_seconds != 0) {
start_time = 'T' + start_hours + start_minutes + start_seconds;
end_time = 'T' + end_hours + end_minutes + end_seconds;
}
from ics.js.
Fixed
from ics.js.
Related Issues (20)
- How to set the time zone of an event? HOT 4
- No License provided HOT 1
- How to delete added event from ics.js
- Use server side in node.js? HOT 1
- Relation to adamgibbons/ics
- Setting UID and Organizer
- download ics file in chrome and firefox HOT 1
- There is no GEO: to pass the coordinates
- Fore .ics to download
- Webcal link support HOT 1
- how can i use this library in angular 5 typescript HOT 1
- Mobile version download document.txt instead ics HOT 5
- Demo makes event for 1987
- how do I install use npm?
- Not working on iPhone devices HOT 4
- lowercase 'rrule' causes calendar app on Mac to not recognize recurrence HOT 1
- Meeting end time is not displaying properly HOT 1
- MacOS Calendar doesn't accept rrule property when lowercase HOT 1
- alldayflag HOT 1
- Publish to npm HOT 1
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.js.