Returns the last modified date of the file. Files without a known last modified date use the current date instead.


var time = instanceOfFile.lastModifiedDate


A Date object.


// fileInput is a HTMLInputElement: <input type="file" multiple id="myfileinput">
var fileInput = document.getElementById("myfileinput");

// files is a FileList object (simliar to NodeList)
var files = fileInput.files;

for (var i = 0; i < files.length; i++) {
  alert(files[i].name + " has a last modified date of " + files[i].lastModifiedDate);


Specification Status Comment
File API
The definition of 'lastModifiedDate' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
File.lastModified 13.0 15.0 (15.0) 10.0 16.0 Not supported
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
File.lastModified Not supported Not supported Not supported Not supported Not supported

See also

Document Tags and Contributors

Contributors to this page: Jeremie, teoli, iamanupmenon, Sheppy, evilpie, ethertank, trevorh
Last updated by: Jeremie,