Moment version: 2.0.0 After reading the docs, I thought this would be straight-forward (Chrome console): var timestring1 = "2013-05-09T00:00:00Z"; var timestring2 = "2013-05-09T02:00:00Z"; var startdate = moment(timestring1); var expected_enddate...
  • June 1, 2022
  • 0 Comments
I’m trying to convert UTC time to the local time. I’ve been following this example from this link: http://jsfiddle.net/FLhpq/4/light/. I can’t seem to get the right local output. For...
  • May 30, 2022
  • 0 Comments
I’m using Moment.js to parse and format dates in my web app. As part of a JSON object, my backend server sends dates as a number of milliseconds from...
  • May 25, 2022
  • 0 Comments
i have a start date string “20.03.2014” and i want to add 5 days to this with moment.js but i don’t get the new date “25.03.2014” in the alert...
  • May 25, 2022
  • 0 Comments
I’m using moment.js to do most of my date logic in a helper file for my React components but I haven’t been able to figure out how to mock...
  • May 25, 2022
  • 0 Comments