Tuesday, February 14, 2023

link dump of possible google apps and javascript solutions

(The following is a link dump of various possibilities searched out for implementing this, for which plain javascript without Google Apps script was finally used.)

Link dump:

We can automatically choose the user's timezone, and also have a timezone setting from any of these,

according to
 
 
 
"Correct way" - tested working

console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)

Documentation
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions
 
"Do we have some stats on the number of daily user visits to the schedule page? If so, that would be useful in planning the type of page - could even make it a static page with data delivered via ajax using client-side javascript. There are some limits to the number of Google Apps Script executions per day. For example, I'm using a URL Fetch function, that is limited to 100,000 calls per day. " 

Checking out client side javascript rendering, found that is faster than Google Apps Script, faster than our php/mysql also :)

Client-side example:
for which the code is at 
(takes the data from a text file saved in the same server)

Google Apps script example:
(takes the data from a Google Sheet)
Google Apps test code has now been put up at 
comments in the code show the various issues with the different approaches.
 
 

No comments:

Post a Comment