No release in over 3 years
Low commit activity in last 3 years
Moment.js is a lightweight javascript date library for parsing, manipulating, and formatting dates. This gem allows for its easy inclusion into the rails asset pipeline.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.2.12
~> 3.0

Runtime

>= 3.1
 Project Readme

momentjs-rails

momentjs-rails wraps the Moment.js 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 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.29.4.1 == Moment.js 2.29.4

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.