Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 516 Bytes

01-node-js.md

File metadata and controls

27 lines (20 loc) · 516 Bytes
title
Node.js
npm install moment
var moment = require('moment'); // require
moment().format(); 

Or in ES6 syntax:

import moment from 'moment';
moment().format();

Note: In 2.4.0, the globally exported moment object was deprecated. It will be removed in next major release.

If you want to include Moment Timezone as well, see the separate Moment Timezone docs for Node.js with examples.