File.lastModifiedDate

SummaryEdit

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

SyntaxEdit

var time = instanceOfFile.lastModifiedDate

ValueEdit

A Date object.

ExampleEdit

// 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);
}

SpecificationsEdit

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

Browser compatibilityEdit

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

See alsoEdit

Document Tags and Contributors

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