plasmapy.github.io icon indicating copy to clipboard operation
plasmapy.github.io copied to clipboard

Make #110 display user's timezone calendar

Open StanczakDominik opened this issue 4 years ago • 4 comments

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?

StanczakDominik avatar Jul 20 '21 18:07 StanczakDominik

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?

zorjo avatar Sep 15 '21 11:09 zorjo

Could be! Wanna give it a try? :)

StanczakDominik avatar Sep 16 '21 07:09 StanczakDominik

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

zorjo avatar Sep 18 '21 04:09 zorjo

if it is still open., i can work on it

Bodasaieswar avatar Jun 13 '24 19:06 Bodasaieswar