Desaprobado
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.
La propiedad de solo lectura File.lastModifiedDate
retorna la fecha de ultima modificacion del archivo. Archivos sin una ultima fecha de modificacion conocida retornan la fecha actual.
Sintaxis
var time = instanceOfFile.lastModifiedDate
Valor
Un objeto Date
.
Ejemplo
// fileInput es un HTMLInputElement: <input type="file" multiple id="myfileinput">
var fileInput = document.getElementById("myfileinput");
// files es un objeto FileList (similar a NodeList)
var files = fileInput.files;
for (var i = 0; i < files.length; i++) {
alert(files[i].name + " tiene una fecha de ultima modificacion el " + files[i].lastModifiedDate);
}
Especificaciones
Aunque estaba presente en las primeras versiones de la especificacion de File API, esta propiedad ha sido eliminada de esta y ahora es no-estandar. Usar File.lastModified
como reemplazo.
Compatibilidad con navegadores
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Caracteristica | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
File.lastModified | 13.0 | (Yes) | 15.0 (15.0) | 10.0 | 16.0 | Sin soporte |
Caracteristica | Android | Edge | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
File.lastModified | Sin soporte | (Yes) | Sin soporte | Sin soporte | Sin soporte | Sin soporte |