YukiGasai / obsidian-google-calendar

Add Google Calendar inside Obsidian
https://yukigasai.github.io/obsidian-google-calendar/
GNU General Public License v3.0
359 stars 25 forks source link

There is no options to select first day of week for weekly view #148

Closed mathisgauthey closed 1 year ago

mathisgauthey commented 1 year ago

Hi there, I'd like to put monday as a first day on my calendar weekly view code block. Is this possible ? I can't find it in the settings section.

Thanks in advance !

YukiGasai commented 1 year ago

Hi, please see if the solution in #31 works for you.

mathisgauthey commented 1 year ago

Hey there, I already saw that issue and no, because it does only change for the month view.

I guess it is not an easy fix right now as the actual view is based on today with an offset I guess.

However it should be possible to use today with a format such as moment(today, "YYYY-MM-DD").format("gggg-[W]ww") to get the week number and specify the first day to be Monday or Sunday?

That could mean only a single option to select "entire week view" -> No, Monday or Sunday.

m-beau commented 1 year ago

This works for me:

date: ;window.moment().startOf("week");
type: week
navigation: true
hourRange: [8, 24]
mathisgauthey commented 1 year ago

This works for me:

date: ;window.moment().startOf("week");
type: week
navigation: true
hourRange: [8, 24]

I needed to update the plugin to make it works but it is what I needed. Thanks a lot !