MomentJS - parseZone


Advertisements

This method parses the string provided and keeps the resulting moment in a fixed timezone.

Syntax

moment.parseZone()
moment.parseZone(String)

Example

var a = moment().parseZone();

Output

parseZone

moment.parseZone is similar to using moment.utcOffset with a string.

Example

var a = moment("2013-01-01T00:00:00-13:00").utcOffset("2013-01-01T00:00:00-13:00");
var b = moment.parseZone("2013-01-01T00:00:00-13:00");

Output

moment.parseZone
momentjs_parsing_date_and_time.htm
Advertisements