--- title: Date.prototype.getMilliseconds() slug: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds tags: - Date - JavaScript - Довідка - метод translation_of: Web/JavaScript/Reference/Global_Objects/Date/getMilliseconds ---
Метод getMilliseconds() повертає мілісекунди у вказаній даті згідно з місцевим часом.
dateObj.getMilliseconds()
Число між 0 та 999, що відображає мілісекунди для наданої дати згідно з місцевим часом.
getMilliseconds()Наступний приклад присвоює значення мілісекунд поточного часу змінній milliseconds:
var today = new Date(); var milliseconds = today.getMilliseconds();
| Специфікація |
|---|
| {{SpecName('ESDraft', '#sec-date.prototype.getmilliseconds', 'Date.prototype.getMilliseconds')}} |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
{{Compat("javascript.builtins.Date.getMilliseconds")}}