sawhney17 / logseq-calendars-plugin

MIT License
127 stars 17 forks source link

parsing calendar with changed prefered data format #9

Open jeremyforest opened 2 years ago

jeremyforest commented 2 years ago

I think there is an issue with importing events when the preferred date format is something other than the default one (in the form MMM do, yyyy). If I change the format, then only the calendar name gets imported but non of the content of the events for that day (seems like the parsing is not working correctly in that case but I could be wrong on that).

Might also relate to https://github.com/sawhney17/logseq-calendars-plugin/issues/6#issuecomment-1034394876

sawhney17 commented 2 years ago

Can you make sure you first restart after changing the format and also make sure you're on the latest version? On 10 Feb 2022, 8:07 PM +0400, Jeremy Forest @.***>, wrote:

I think there is an issue with importing events when the preferred date format is something other than the default one (in the form MMM do, yyyy). If I change the format, then only the calendar name gets imported but non of the content of the events for that day (seems like the parsing is not working correctly in that case but I could be wrong on that). Might also relate to #6 (comment) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jeremyforest commented 2 years ago

Tried restarting logseq after changing the date format but that doesn't solve the issue. I haven't made a thorough analysis but it seems some format work, some partially work and some don't. Probably something to do with parsing the actual E/M/D/Y ?

Logseq 0.5.9 calendar plugin 1.1.6

sawhney17 commented 2 years ago

Hmm. That seems like a bug. What is your date format? I'll do some testing with that to try and identify the ones that don't work.

sawhney17 commented 2 years ago

Also, could you update to the latest version and check the develoepr console for a message with current date: Does that message return your correct date format?

sawhney17 commented 2 years ago

I've just updated to 1.2.3 to attempt a fix. Do report back if it works.

jeremyforest commented 2 years ago

@sawhney17 thanks for the push ! Let me check.

Hum ok that actually broke my current date format which is MMMM do, yyyy. Instead of importing the events, I now have only the calendar names. No events are imported. Current Date: February 18th, 2022 which is the correct format.

Let me other formats. Current Date: Friday, 02/18/2022. Date format seems right. But still broken as well for import.

index.61e956d2.js:4 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'substring') at Po (index.61e956d2.js:4) at index.61e956d2.js:4

sawhney17 commented 2 years ago

Haven't seen this issue before. Does using this calendar link in your settings work?

https://calendar.google.com/calendar/ical/rao6fvrrsq6mdorf9n30fs6mk4%40group.calendar.google.com/private-18ccd424400ef24c5d343ec93b289590/basic.ics

On 18 Feb 2022, 3:12 PM +0400, wrote:

Cannot read properties of undefined (reading 'substring') at

matthewn commented 1 year ago

I believe I am bumping up against this bug. My preferred date format is set to "d MMMM yyyy". I get messages that my calendars are being fetched and filtered, and then "No events for the day detected". Logseq 0.8.0, plugin 2.2.2.

Any hope of getting this plugin working in my Logseq?

sawhney17 commented 1 year ago

Does it work in a graph with default date format? You can create a blank graph and test. On 12 Aug 2022 at 7:41 AM +0400, matthewn @.***>, wrote:

I believe I am bumping up against this bug. My preferred date format is set to "d MMMM yyyy". I get messages that my calendars are being fetched and filtered, and then "No events for the day detected". Logseq 0.8.0, plugin 2.2.2. Any hope of getting this plugin working in my Logseq? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

matthewn commented 1 year ago

Tested with a blank graph, and the plugin worked as expected.

reinaldoluckman commented 9 months ago

I have the same issue here.

reinaldoluckman commented 9 months ago

Here is the developer console screen shot. Looks like it is getting the events, but an error occurs after that.

Screenshot 2023-10-11 at 20 32 18
reinaldoluckman commented 9 months ago

Changed the date format to Logseq default (MMM do, yyyy) and importing went fine.