javascript - Momentjs returning different results on firefox compared to chrome -
just typing out line on firefox , chrome
moment("september 2015") < moment("september 2015").endof('month')
i true on chrome , false on firefox, how can make result more consistent?
from momentjs docs http://momentjs.com/docs/#/parsing/now/
browser support parsing strings inconsistent. because there no specification on formats should supported, works in browsers not work in other browsers. consistent results parsing other iso 8601 strings, should use string + format.
so specify format
moment("september 2015", "mmmm yyyy") < moment("september 2015", "mmmm yyyy").endof('month')
and should work same.
Comments
Post a Comment