Temporal.ZonedDateTime.prototype.microsecond
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Thuộc tính accessor microsecond của các thực thể Temporal.ZonedDateTime trả về một số nguyên từ 0 đến 999 biểu thị thành phần micro giây (10-6 giây) của thời gian này.
Set accessor của microsecond là undefined. Bạn không thể thay đổi thuộc tính này trực tiếp. Hãy sử dụng phương thức with() để tạo một đối tượng Temporal.ZonedDateTime mới với giá trị mong muốn.
Để biết thêm thông tin chung và các ví dụ khác, hãy xem Temporal.PlainTime.prototype.microsecond.
Ví dụ
>Sử dụng microsecond
js
const dt = Temporal.ZonedDateTime.from(
"2021-07-01T12:34:56.123456789-04:00[America/New_York]",
);
console.log(dt.microsecond); // 456
Đặc tả
| Specification |
|---|
| Temporal> # sec-get-temporal.zoneddatetime.prototype.microsecond> |
Tương thích trình duyệt
Xem thêm
Temporal.ZonedDateTimeTemporal.ZonedDateTime.prototype.with()Temporal.ZonedDateTime.prototype.add()Temporal.ZonedDateTime.prototype.subtract()Temporal.ZonedDateTime.prototype.secondTemporal.ZonedDateTime.prototype.millisecondTemporal.ZonedDateTime.prototype.nanosecondTemporal.PlainTime.prototype.microsecond