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

Google Apps Script #43

Open
hudcap opened this issue Nov 9, 2017 · 2 comments
Open

Google Apps Script #43

hudcap opened this issue Nov 9, 2017 · 2 comments

Comments

@hudcap
Copy link

hudcap commented Nov 9, 2017

Please forgive my ignorance -- I'm familiar with programming in general, but know very little about JS.

I'm trying to create a function in Google Sheets that will convert Hebrew and Gregorian dates using this library.
I imported the client side script into Google Apps Script and created a function, but quickly realized that scripts meant for a browser will not play well in GAS (e.g. window, setInterval, etc.), which runs the script on Google's servers (I think).

I get the feeling I'm going about this the wrong way - should I be using the Node version? I'm a little lost on how that works...

If anyone is able to help, I'd greatly appreciate it.
Thanks!

@Scimonster
Copy link
Contributor

That's a good idea which i also thought of a couple days ago. :)

I haven't tried it or done too much research, but are you sure that it doesn't work in GAS? (Also, setInterval isn't specific to the browser.)

@hudcap
Copy link
Author

hudcap commented Nov 12, 2017

The first error I got is that window on line 902 (of hebcal.js from the client folder) is undefined. It seemed to me that this line makes Hebcal a global variable (you would know better :-)), so i got rid of the window. part, which should serve the same purpose.

The next error was from setInterval (line 2812), and when I found this, I gave up :)

I'm no programming expert. I enjoy getting code to work, so I program with one hand in the IDE and the other in Google, but I know once I'm out of my depth :)

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