Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date and time are converted to NAN in Google Calendar #84

Closed
hzrcan opened this issue May 12, 2020 · 4 comments
Closed

Date and time are converted to NAN in Google Calendar #84

hzrcan opened this issue May 12, 2020 · 4 comments

Comments

@hzrcan
Copy link

hzrcan commented May 12, 2020

Hi,

When I use the Datebook I get the startdate and enddate as NaNaNaNTaNaNaN/NaNaNaNTaNaNaN for each calendar.

import { GoogleCalendar } from 'datebook'

 const google = new GoogleCalendar({
   title: 'Happy Hour',
   location: 'The Bar, New York, NY',
   description: 'Let\'s blow off some steam from our weekly deployments to enjoy a tall cold one!',
   start: '20190704T190000',
   end: '20190704T210000',
   recurrence: {
     frequency: 'WEEKLY'
     interval: 2
   }
 })

 google.render()

It returns:

https://calendar.google.com/calendar/r/eventedit?text=Happy+Hour&details=Let%27s+blow+off+some+steam+from+our+weekly+deployments+to+enjoy+a+tall+cold+one!&location=The+Bar,+New+York,+NY&dates=NaNaNaNTaNaNaN/NaNaNaNTaNaNaN&recur=RRULE:FREQ%3DWEEKLY;INTERVAL%3D2

@hzrcan
Copy link
Author

hzrcan commented May 12, 2020

When I change the start and end in the object (options) to:

start: '2019-03-23T17:00:00',
 end: '2019-05-23T17:00:00'

it works for the other calendars.

But for Google Calendar, I get:
https://calendar.google.com/calendar/r/eventedit?text=Happy+Hour&details=Let%27s+blow+off+some+steam+from+our+weekly+deployments+to+enjoy+a+tall+cold+one!&location=The+Bar,+New+York,+NY&dates=NaNaNaNTaNaNaN/NaNaNaNTaNaNaN

dates=NaNaNaNTaNaNaN/NaNaNaNTaNaNaN

@hzrcan hzrcan changed the title Date and time are converted to NAN Date and time are converted to NAN in Google Calendar May 12, 2020
@jshor
Copy link
Owner

jshor commented May 12, 2020

Hi,

Yes, the docs appear to have the wrong date format. I'm opening a PR to fix this now. As you pointed out, the dates should be in ISO 8601.

I will investigate the Google Calendar issue.

@hzrcan
Copy link
Author

hzrcan commented May 12, 2020

Hi mate,

Thanks. It's only in Google Calendar.

Hope it gets fixed soon

jshor added a commit that referenced this issue May 13, 2020
Fixes issue with Google Calendar returning NaN... for timestamps.
Updates documentation to reflect proper ISO 8601 handling of timestamp
formats. Updates incorrect timestamp formats for recurrences and Yahoo
calendar. Fixes Outlook calendar base URL.
jshor added a commit that referenced this issue May 13, 2020
Fixes issue with Google Calendar returning NaN... for timestamps.
Updates documentation to reflect proper ISO 8601 handling of timestamp
formats. Updates incorrect timestamp formats for recurrences and Yahoo
calendar. Fixes Outlook calendar base URL.
jshor added a commit that referenced this issue May 13, 2020
Fixes issue with Google Calendar returning NaN... for timestamps.
Updates documentation to reflect proper ISO 8601 handling of timestamp
formats. Updates incorrect timestamp formats for recurrences and Yahoo
calendar. Fixes Outlook calendar base URL.
@jshor
Copy link
Owner

jshor commented May 14, 2020

@hzrcan should be fixed now in version 4.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants