moment 0,19,37,23,0,32,0,40 editorconfig travis-ci grunt Bower Packagist npm

Parse, validate, manipulate, and display dates in javascript.

2 years after MIT

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.

Related Repositories

angular-moment

angular-moment

Moment.JS directives for Angular.JS (timeago and more) ...

moment-range

moment-range

Fancy date ranges for Moment.js ...

moment.php

moment.php

Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired ...

moment-jalaali

moment-jalaali

A Jalaali (Jalali, Persian, Khorshidi, Shamsi) calendar system plugin for moment ...

vue-moment

vue-moment

Handy Moment.js filters for your Vue.js project. ...


Top Contributors

ichernev timrwood icambron Oire mj1856 caillou igorlima mbad0la Xotic750 nrbgt kruyvanna jbleduigou weldan mechuwind vnathalye maggiepint mdxs eternicode raphamorim tehnicaorg ianwremmel szelga vajradog alexstrat tcarlsen wyantb dandv guybedford jisaacks fduch2k

Dependencies

package version
dev uglify-js latest
es6-promise latest
grunt ~0.4
grunt-cli latest
benchmark latest
grunt-contrib-clean latest
grunt-contrib-concat latest
grunt-contrib-copy latest
grunt-contrib-jshint latest
grunt-contrib-uglify latest
grunt-contrib-watch latest
grunt-env latest
grunt-jscs latest
grunt-karma latest
grunt-nuget latest
grunt-benchmark latest
grunt-string-replace latest
grunt-exec latest
load-grunt-tasks latest
karma latest
karma-chrome-launcher latest
karma-firefox-launcher latest
karma-qunit latest
karma-sauce-launcher latest
qunit ^0.7.5
qunit-cli ^0.1.4
rollup latest
spacejam latest
typescript ^1.8.10
coveralls ^2.11.2
nyc ^2.1.4

Releases

-   2.15.1 zip tar
-   2.15.0 zip tar
-   2.14.2 zip tar
-   2.14.1 zip tar
-   2.14.0 zip tar
-   2.13.0 zip tar
-   2.12.0 zip tar
-   2.11.2 zip tar
-   2.11.1 zip tar
-   2.11.0 zip tar
-   2.10.6 zip tar
-   2.10.5 zip tar
-   2.10.3 zip tar
-   2.10.2 zip tar
-   2.9.0 zip tar
-   2.8.4 zip tar
-   2.8.3 zip tar
-   2.8.2 zip tar
-   2.8.1 zip tar
-   2.8.0 zip tar
-   2.7.0 zip tar
-   2.6.0 zip tar
-   2.5.1 zip tar
-   2.5.0 zip tar
-   2.4.0 zip tar
-   2.3.1 zip tar
-   2.3.0 zip tar
-   2.2.1 zip tar
-   2.2.0 zip tar
-   2.1.0 zip tar