Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The with()
method of Temporal.PlainTime
instances returns a new Temporal.PlainTime
object representing this time with some fields replaced by new values. Because all Temporal
objects are designed to be immutable, this method essentially functions as the setter for the time's fields.