forked from moment/moment
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
471d67f
commit d5ebb42
Showing
1 changed file
with
36 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,55 @@ | ||
[](https://gitter.im/moment/moment?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
# [Moment.js](http://momentjs.com/) | ||
|
||
[![NPM version][npm-version-image]][npm-url] [![NPM downloads][npm-downloads-image]][downloads-url] [![MIT License][license-image]][license-url] [![Build Status][travis-image]][travis-url] | ||
[](https://coveralls.io/r/moment/moment?branch=develop) | ||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_shield) | ||
[](https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver) | ||
[![NPM version][npm-version-image]][npm-url] | ||
[![NPM downloads][npm-downloads-image]][npm-downloads-url] | ||
[![MIT License][license-image]][license-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Coverage Status][coveralls-image]][coveralls-url] | ||
[![FOSSA Status][fossa-badge-image]][fossa-badge-url] | ||
[![SemVer compatibility][semver-image]][semver-url] | ||
|
||
A lightweight JavaScript date library for parsing, validating, manipulating, and formatting dates. | ||
A JavaScript date library for parsing, validating, manipulating, and formatting dates. | ||
|
||
**[Documentation](http://momentjs.com/docs/)** | ||
## Project Status | ||
|
||
## Port to ECMAScript 6 (version 2.10.0) | ||
Moment.js is a legacy project, now in maintenance mode. In most cases, you should choose a different library. | ||
|
||
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. | ||
For more details and recommendations, please see [Project Status](https://momentjs.com/docs/#/-project-status/) in the docs. | ||
|
||
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. | ||
*Thank you.* | ||
|
||
## Upgrading to 2.0.0 | ||
## Resources | ||
|
||
There are a number of small backwards incompatible changes with version 2.0.0. [See the full descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes) | ||
- [Documentation](https://momentjs.com/docs/) | ||
- [Changelog](CHANGELOG.md) | ||
- [Stack Overflow](https://stackoverflow.com/questions/tagged/momentjs) | ||
|
||
* 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](https://github.com/moment/moment/blob/develop/CHANGELOG.md) | ||
|
||
## [Contributing](https://github.com/moment/moment/blob/develop/CONTRIBUTING.md) [](https://www.codetriage.com/moment/moment) | ||
## License | ||
|
||
We're looking for co-maintainers! If you want to become a master of time please | ||
write to [ichernev](https://github.com/ichernev). | ||
Moment.js is freely distributable under the terms of the [MIT license][license-url]. | ||
|
||
In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to moment/moment on CodeTriage](https://www.codetriage.com/moment/moment). | ||
[![FOSSA Status][fossa-large-image]][fossa-large-url] | ||
|
||
### Frequently asked questions | ||
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat | ||
[license-url]: LICENSE | ||
|
||
See [FAQ.md](FAQ.md). | ||
[npm-url]: https://npmjs.org/package/moment | ||
[npm-version-image]: https://img.shields.io/npm/v/moment.svg?style=flat | ||
|
||
## License | ||
[npm-downloads-image]: https://img.shields.io/npm/dm/moment.svg?style=flat | ||
[npm-downloads-url]: https://npmcharts.com/compare/moment?minimal=true | ||
|
||
Moment.js is freely distributable under the terms of the [MIT license](https://github.com/moment/moment/blob/develop/LICENSE). | ||
[travis-url]: https://travis-ci.org/moment/moment | ||
[travis-image]: https://img.shields.io/travis/moment/moment/develop.svg?style=flat | ||
|
||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_large) | ||
[coveralls-image]: https://coveralls.io/repos/moment/moment/badge.svg?branch=develop | ||
[coveralls-url]: https://coveralls.io/r/moment/moment?branch=develop | ||
|
||
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat | ||
[license-url]: LICENSE | ||
[fossa-badge-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=shield | ||
[fossa-badge-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_shield | ||
|
||
[npm-url]: https://npmjs.org/package/moment | ||
[npm-version-image]: http://img.shields.io/npm/v/moment.svg?style=flat | ||
[npm-downloads-image]: http://img.shields.io/npm/dm/moment.svg?style=flat | ||
[downloads-url]: https://npmcharts.com/compare/moment?minimal=true | ||
[fossa-large-image]: https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment.svg?type=large | ||
[fossa-large-url]: https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fmoment%2Fmoment?ref=badge_large | ||
|
||
[travis-url]: http://travis-ci.org/moment/moment | ||
[travis-image]: http://img.shields.io/travis/moment/moment/develop.svg?style=flat | ||
[semver-image]: https://api.dependabot.com/badges/compatibility_score?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver | ||
[semver-url]: https://dependabot.com/compatibility-score.html?dependency-name=moment&package-manager=npm_and_yarn&version-scheme=semver |