downloads.DownloadTime

The DownloadTime type of the downloads API represents the time a download took to complete.

Type

A DownloadTime can be one of three different types:

  • a JavaScript Date object.

  • a string:

    • if this contains only digits, it's interpreted as the number of milliseconds since the UNIX epoch.
    • otherwise, it's interpreted as an ISO 8601 string.
  • a number: this is interpreted as the number of milliseconds since the UNIX epoch.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
DownloadTime
Chrome – Partial support
Chrome 22 (Release date: 2012-09-25)
footnote Partial support
footnote Only accepts a string.
Edge – Partial support
Edge 79 (Release date: 2020-01-15)
footnote Partial support
footnote Only accepts a string.
Firefox – Full support
Firefox 47 (Release date: 2016-06-07)
footnote Full support
Opera – Partial support
Opera 15 (Release date: 2013-07-02)
footnote Partial support
footnote Only accepts a string.
Safari – No support
Safari
footnote No support
Firefox for Android – No support
Firefox for Android 48 – 68 (Release date: 2016-08-02)
footnote Removed in 79 and later
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support

Note: This API is based on Chromium's chrome.downloads API.