You are here

toISO8601(Date)

toISO8601(Date) formats a date to an ISO8601 formatted string.

Parameters

Date
Date object to convert.

Returns

The date converted to an ISO8601 formatted string.

Example

 var date = new Date();
 var ISODate = utils.toISO8601(date);
    

The preceding code snippet would result in the datetime Nov 28, 2011 4:50:16 PM being converted to 2011-11-28T16:43:57.039Z.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.