Moment get current date

JavascriptMomentjs

Javascript Problem Overview


How to get current date using the Moment library? Not timestamp, but date. So please don't refer to that timestamp question already to be found.

I know how to get it in regular javascript, but I need a moment object with current date.

What about timezone, how to get current date in certain timezone?

Javascript Solutions


Solution 1 - Javascript

Just call moment as a function without any arguments:

moment()

For timezone information with moment, look at the moment-timezone package: http://momentjs.com/timezone/

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVille Miekk-ojaView Question on Stackoverflow
Solution 1 - JavascriptRob M.View Answer on Stackoverflow