Deluge script lacks advanced trigonometric functions like acos/atan. If you want to implement the great circle distance method, you'll need them. Here is some code I ported to deluge to fix this problem.
Recently I was working on a custom function for Zoho CRM which required me to get the current time in a specified timezone. I assumed that zoho.currenttime would give me the time based on the timezone chosen in the organisation settings but discovered that it always gives it to you in PST. The Zoho Partner team gave me this snippet to solve the problem: current_time_in_timezone = zoho.currenttime.toString("yyyy-MM-dd'T'HH:mm:ss", "Australia/Sydney").toTime("yyyy-MM-dd'T'HH:mm:ss"); If you need the current date, do: current_date_in_timezone = zoho.currenttime.toString("yyyy-MM-dd'T'HH:mm:ss", timezone).toDate(); To figure out what you can put in for the timezone part, refer to https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
This comment has been removed by a blog administrator.
ReplyDeleteHi Jeremy, impressive, but I wonder if it doesn't make more sense to use math.js or python (or whatever specialized library available for this or any other task) to build an app and call the functions from Deluge geturl. Maybe performance wouldn't be optimal but to build a page or a map should be enough. What do you think? As far as I know, Deluge doesn't allow to build portable libraries, does it?
ReplyDeleteThat is definitely an option.
Delete