HTML DOM lastModified Property

Document Object Reference Document Object

Example

Get the date and time the current document was last modified:

var x = document.lastModified;

The result of x will be:

11/13/2014 10:05:21

Try it yourself »

More "Try it Yourself" examples below.


Definition and Usage

The lastModified property returns the date and time the current document was last modified.

Note: This property is read-only.


Browser Support

Property
lastModified Yes Yes Yes Yes Yes


Syntax

document.lastModified

Technical Details

Return Value: A String, representing the date and time the document was last modified
DOM Version Core Level 3 Document Object


Examples

More Examples

Example

Convert the lastModified property into a Date object:

var x = new Date(document.lastModified);

The result of x will be:

Thu Nov 13 2014 10:05:21 GMT-0800 (Pacific Standard Time)

Try it yourself »


Document Object Reference Document Object

Color Picker

colorpicker