Parse, validate, manipulate, and display dates in javascript.
JavaScript Other
Latest commit b8a297c Dec 4, 2016 @ichernev ichernev Build 2.17.1
Permalink
Failed to load latest commit information.
benchmarks Added benchmarks for some supported operations Sep 3, 2016
locale Build 2.17.1 Dec 4, 2016
meteor Bump version to 2.17.1 Dec 4, 2016
min Build 2.17.1 Dec 4, 2016
scripts Add find-commenters option to the script Aug 31, 2016
src Bump version to 2.17.1 Dec 4, 2016
tasks Fix linter issue Nov 10, 2016
templates Apply custom header to generated files Nov 6, 2016
typing-tests Change typescript version back to 1.8.10 and remove strictNullChecks Dec 4, 2016
.editorconfig Add .editorconfig for project May 4, 2015
.gitattributes Introduce end-of-line normalization Mar 24, 2016
.gitignore Update .gitignore Nov 9, 2015
.jscs.json Fix jscs 3.0 error: 'The `esnext` option is enabled by default.' Jun 7, 2016
.jshintrc Clean up jscs and jshint errors in tests. Mar 25, 2015
.npmignore Remove npmignore file from npm package Sep 1, 2016
.spmignore ignore files in packages May 4, 2015
.travis.yml Drop 0.10 environment from .travis.yml Nov 6, 2016
CHANGELOG.md Update changelog for 2.17.1 Dec 4, 2016
CONTRIBUTING.md Adds "sign CLA" link to `CONTRIBUTING.md`. Nov 29, 2016
Gruntfile.js Publish Meteor package from meteor directory to fix #3531. Nov 6, 2016
ISSUE_TEMPLATE.md moment issue template Jun 24, 2016
LICENSE license typo Nov 1, 2016
Moment.js.nuspec Bump version to 2.17.1 Dec 4, 2016
README.md Update README.md Mar 18, 2016
bower.json Add ISSUE_TEMPLATE.md and typing-tests to bower ignores Nov 6, 2016
component.json Build 2.17.1 Dec 4, 2016
composer.json Use JavaScript instead of javascript in pkg descriptions Dec 1, 2014
ender.js play nicely within an Ender build Apr 4, 2012
moment.d.ts Replace null/undefined with void in moment.d.ts to fix pre 2.0 typesc… Dec 4, 2016
moment.js Build 2.17.1 Dec 4, 2016
package.js add a dojo build profile Nov 26, 2012
package.json Bump version to 2.17.1 Dec 4, 2016

README.md

Join the chat at https://gitter.im/moment/moment

NPM version NPM downloads MIT License Build Status Coverage Status

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

Documentation

Port to ECMAScript 6 (version 2.10.0)

Moment 2.10.0 does not bring any new features, but the code is now written in ECMAScript 6 modules and placed inside src/. Previously moment.js, locale/*.js and test/moment/*.js, test/locale/*.js contained the source of the project. Now the source is in src/, temporary build (ECMAScript 5) files are placed under build/umd/ (for running tests during development), and the moment.js and locale/*.js files are updated only on release.

If you want to use a particular revision of the code, make sure to run grunt transpile update-index, so moment.js and locales/*.js are synced with src/*. We might place that in a commit hook in the future.

Upgrading to 2.0.0

There are a number of small backwards incompatible changes with version 2.0.0. See the full descriptions here

  • Changed language ordinal method to return the number + ordinal instead of just the ordinal.

  • Changed two digit year parsing cutoff to match strptime.

  • Removed moment#sod and moment#eod in favor of moment#startOf and moment#endOf.

  • Removed moment.humanizeDuration() in favor of moment.duration().humanize().

  • Removed the lang data objects from the top level namespace.

  • Duplicate Date passed to moment() instead of referencing it.

Changelog

Contributing

We're looking for co-maintainers! If you want to become a master of time please write to ichernev.

License

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