The Moment documentation

Over inside the browser we can pull it up by going to momentjs.com. The documentation for Moment is fantastic. It's available on the Docs page, and to get started in order to figure out how to use format we're going to go to the Display section:

The first item in Display is format. There are a few examples about how to use format, but the really useful information is what we have here:

Here we have all the tokens that we can put inside the string to format our day as we like. Up previous you can see you can use as ...

Get Advanced Node.js Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.