Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including moment with all npm packages installed. Try it out:

var moment = require("moment") // format the current date var now = moment(); console.log(now.format("dddd, MMMM Do YYYY, h:mm:ss a")) //date math example console.log(moment('2016-03-12 13:00:00').add(1, 'day').format('LLL')) //time math example console.log(moment('2016-03-12 13:00:00').add(24, 'hours').format('LLL')) // moment API moment

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

moment v2.29.1

Parse, validate, manipulate, and display dates


NPM version NPM downloads MIT License Build Status Coverage Status FOSSA Status SemVer compatibility

A JavaScript date library for parsing, validating, manipulating, and formatting dates.

Project Status

Moment.js is a legacy project, now in maintenance mode. In most cases, you should choose a different library.

For more details and recommendations, please see Project Status in the docs.

Thank you.



Moment.js is freely distributable under the terms of the MIT license.

FOSSA Status


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free