MomentJS - As JSON



When this method is used on a moment object it will displayed as an ISO8601 string, adjusted to UTC.

Syntax

moment().toJSON();

Example

var a = moment().toJSON();

Output

As JSON
momentjs_formatting_date_and_time.htm
Advertisements