Skip to content

acreeger/meteor-moment

 
 

Repository files navigation

Moment v2.8.1 for Meteor Build Status

Moment.js, a JavaScript date library for parsing, validating, manipulating, and formatting dates, packaged for Meteor.

Installation

For Meteor v0.9.0 and above: meteor add mrt:moment

For Meteor versions below v0.9.0 using Meteorite/AtmosphereJS: mrt add moment

Usage

Just like the moment docs tell you:

var oneMomentPlease = moment();

Locales

To send all moment locales to the client, set the following environment variables:

METEOR_MOMENT_OPTS='{"clientLocales":"ALL"}'

Limitations:

  • Locales are currently not supported on the server. This is due to the locales explicitly asking for the "window" object.
  • In the future, I'd like to load only select locales. However, for now, it must remain a dream. Or a future pull request from one of you lovely people. That would be nice.

Known Issues

  • There seems to be some kind of caching of packaged files going on. If you toggle loading of locale files and restaart the server, there are times when the locales will load when not requested, and vice versa.

About

OBSOLETE - see README.md. Moment JS packaged for Meteor.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%