File: README.md

package info (click to toggle)
ruby-momentjs-rails 2.20.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 924 kB
  • sloc: ruby: 98; makefile: 3
file content (34 lines) | stat: -rw-r--r-- 1,189 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# momentjs-rails

momentjs-rails wraps the [Moment.js](http://momentjs.com/) library in a rails
engine for simple use with the asset pipeline provided by Rails 3.1 and higher.
The gem includes the development (non-minified) source for ease of exploration.
The asset pipeline will minify in production.

Moment.js is "a lightweight javascript date library for parsing, manipulating,
and formatting dates." Moment.js does not modify the native Date object. Rather,
it creates a wrapper for it. Please see the
[documentation](http://momentjs.com/docs/) for details.

## Usage

Add the following to your gemfile:

    gem 'momentjs-rails'

Add the following directive to your Javascript manifest file (application.js):

    //= require moment

If you want to include a localization file, also add the following directive:

    //= require moment/<locale>.js

## Versioning

momentjs-rails 2.20.1 == Moment.js 2.20.1

Every attempt is made to mirror the currently shipping Moment.js version number
wherever possible. The major, minor, and patch version numbers will always
represent the Moment.js version. Should a gem bug be discovered, a 4th version
identifier will be added and incremented.