Temporal.ZonedDateTime.prototype.millisecond
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 millisecond 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 mili giây (10-3 giây) của thời gian này.
Set accessor của millisecond 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.millisecond.
Ví dụ
>Sử dụng millisecond
js
const dt = Temporal.ZonedDateTime.from(
"2021-07-01T12:34:56.123456789-04:00[America/New_York]",
);
console.log(dt.millisecond); // 123
Đặc tả
| Specification |
|---|
| Temporal> # sec-get-temporal.zoneddatetime.prototype.millisecond> |
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.microsecondTemporal.ZonedDateTime.prototype.nanosecondTemporal.PlainTime.prototype.millisecond