Using current time in sync function

Generally I don’t like using time as the input into a decision. But in this case I’m considering it.

In the sync function on Sync Gateway I’d like to accept document updates if the object was created not too long ago. If the object was created more than 24hrs ago, I’d like to reject further updates. Essentially freezing the document.
Can I do this in the sync function ?
Are these Javascript functions available:
(new Date()).getTime()

Generally I have never found a definitive section in that defines which Javascript functions are available, or which JavaScript runtime version is running in Sync Gateway (e.g. trial and error told me that the keyword ‘let’ is not available)

As a general rule, the Sync Function should be idempotent, and so not depend on things like the current time. There are a number of scenarios that trigger the sync function to be rerun, and it’s necessary to ensure that the results of the sync function are consistent each time it is run.

I understand the risks of this, but what about my question ?
Is “” or “new Date()” available in the sync function ?
Or more generally, how can I find out which Javascript features are available ?