Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
title
Browserify
npm install moment
var moment = require('moment');
moment().format();

Note: There is a bug that prevents moment.locale from being loaded.

var moment = require('moment');
moment.locale('cs');
console.log(moment.locale()); // en

Use the workaround below

var moment = require('moment');
require('moment/locale/cs');
console.log(moment.locale()); // cs

In order to include all the locales

var moment = require('moment');
require("moment/min/locales.min");
moment.locale('cs');
console.log(moment.locale()); // cs