Loading locales in NodeJS1.0.0+

  1. moment.locale(String);

Loading locales in NodeJS is super easy. If there is a locale file in moment-root/locale/ named after that key, the first call to moment.locale will load it.

  1. var moment = require('moment');
  2. moment.locale('fr');
  3. moment(1316116057189).fromNow(); // il y a une heure

If you want your locale supported, create a pull request to the develop branch with the required locale and unit test files.