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

Make #110 display user's timezone calendar #111

Open
StanczakDominik opened this issue Jul 20, 2021 · 3 comments
Open

Make #110 display user's timezone calendar #111

StanczakDominik opened this issue Jul 20, 2021 · 3 comments

Comments

@StanczakDominik
Copy link
Member

Erik's embed in #110 is basically

https://calendar.google.com/calendar/embed?height=300&wkst=1&bgcolor=%23ffffff&ctz=America%2FLos_Angeles&src=Y19zcXFxMzkwczI0ampmanAzcTg2cHY0MXBpOEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t&color=%2354bfbf&showTitle=1&showNav=1&mode=MONTH&showTabs=1&showCalendars=0&showPrint=0&showDate=1

But suppose we e.g. had a piece of javascript that did this dynamically, using maybe something like https://stackoverflow.com/questions/1091372/getting-the-clients-time-zone-and-offset-in-javascript, then generated that embed dynamically?

Anyone know javascript?

@zorjo
Copy link

zorjo commented Sep 15, 2021

Maybe something like console.log(Intl.DateTimeFormat().resolvedOptions().timeZone.replace("/","%2F")) would be used in place of ctz and the other part can be concateneted?

@StanczakDominik
Copy link
Member Author

Could be! Wanna give it a try? :)

@zorjo
Copy link

zorjo commented Sep 18, 2021

I just sent over a pull request for you folks! Hope it helps. #115

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

No branches or pull requests

2 participants