How long before App Script supports the Temporal API?

Javascript’s Temporal API is finally at Stage 4 for the ES2027 release. When can we expect this and other language features in Google Apps Script (which is based on Javascript)?

The main thing I’d watch here is the difference between JavaScript language support and the APIs exposed by the Apps Script runtime. Even if Temporal becomes part of the JavaScript standard, that doesn’t necessarily mean Apps Script will expose the full API immediately.

I’d check the Apps Script runtime release notes and test the specific Temporal features you need in a small script rather than assuming browser/Node.js support will carry over directly. For production code, it may also be worth keeping a fallback for date/time handling until Apps Script officially documents support.

Hopefully Google can clarify whether Temporal is on the roadmap and, if so, which runtime/version would support it.

The main thing I’d watch here is the difference between JavaScript language support and the APIs exposed by the Apps Script runtime. Even if Temporal becomes part of the JavaScript standard, that doesn’t necessarily mean Apps Script will expose the full API immediately.

That was never my assumption. Just fishing for a timeline. I’d wager implementing Temporal would be a priority given the plethora of issues that plague the Date class.

I’d check the Apps Script runtime release notes and test the specific Temporal features you need in a small script rather than assuming browser/Node.js support will carry over directly.

I regularly do. But there has been no mention of Temporal in the release notes as yet. And testing for the Temporal primitive directly in Apps Script currently results in a not found error.

For production code, it may also be worth keeping a fallback for date/time handling until Apps Script officially documents support.

My current workaround is to use a polyfill for Temporal pulled from NPM as a drop-in replacement. But I’d rather not have that as a dependency given that package managers have become a popular attack vector these days.

Hopefully Google can clarify whether Temporal is on the roadmap and, if so, which runtime/version would support it.

I certainly hope they do. Anyone from Google central care to chime in?

Hey, wondering the same thing.

Apps Script runs on V8 which already supports Temporal, but Google tends to lag on new JS features. They’ve moved away from Rhino, so the foundation is there, but I wouldn’t expect it anytime soon.

Stick with polyfills or workarounds for now. If anyone from Google is reading — please! :grinning_face_with_smiling_eyes: