Temporal.PlainDateTime.prototype.microsecond
microsecond
属性是
实例的一个存取器属性,它返回一个 0 到 999 之间的整数,表示该时间的微秒(10-6 秒)部分。Temporal.PlainDateTime
microsecond
的 set 存取器是 undefined
。您不能直接修改此属性。请使用 with()
方法创建一个具有所需新值的 Temporal.PlainDateTime
新对象。
有关通用信息和更多示例,请参阅 Temporal.PlainTime.prototype.microsecond
。
示例
使用 microsecond
js
const dt = Temporal.PlainDateTime.from("2021-07-01T12:34:56.123456789");
console.log(dt.microsecond); // 456
规范
规范 |
---|
Temporal # sec-get-temporal.plaindatetime.prototype.microsecond |
浏览器兼容性
加载中…
另见
Temporal.PlainDateTime
Temporal.PlainDateTime.prototype.with()
Temporal.PlainDateTime.prototype.add()
Temporal.PlainDateTime.prototype.subtract()
Temporal.PlainDateTime.prototype.second
Temporal.PlainDateTime.prototype.millisecond
Temporal.PlainDateTime.prototype.nanosecond
Temporal.PlainTime.prototype.microsecond