You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporal (spec, reference) is a newly proposed JS API to handle dates and times. (Currently at Stage 3, which means it is not yet in any ES draft but it is mostly stable)
Unlike traditional JS dates, it is fully timezone aware: it is possible to construct a Temporal object for an arbitrary timezone. This would allow proper conversion between ThingTalk Date and Time.
The steps to incorporate Temporal are:
include the Temporal polyfill
extend the runtime code to handle Temporal objects where Dates are expected (for the "set_time" thingtalk operator, for "==", "+", etc.)
modify Ast.DateValue to carry a Temporal.ZonedDateTime for absolute dates, and treat everything else as incomplete/partial dates
modify the syntax code to use Temporal objects (will require the parser to be timezone-aware)
modify Genie to cope with Temporal objects in ThingTalk results, in ASTs, and in its i18n code
modify Genie's builtin skills to return Temporal objects instead of Date
update type-checking in unit tests to accept Temporal objects
gradually modify all skills that return dates to return Temporal objects
The text was updated successfully, but these errors were encountered:
Temporal (spec, reference) is a newly proposed JS API to handle dates and times. (Currently at Stage 3, which means it is not yet in any ES draft but it is mostly stable)
Unlike traditional JS dates, it is fully timezone aware: it is possible to construct a Temporal object for an arbitrary timezone. This would allow proper conversion between ThingTalk
Date
andTime
.The steps to incorporate Temporal are:
The text was updated successfully, but these errors were encountered: