How to use the locale function from moment
Find comprehensive JavaScript moment.locale code examples handpicked from public code repositorys.
GitHub: medic/cht-core

22 23 24 25 26 27 28 29 30 31
$translate, SetLanguageCookie ) { 'ngInject'; return function(code, setLanguageCookie) { moment.locale([code, 'en']); $translate.use(code); if (setLanguageCookie !== false) { SetLanguageCookie(code);
2 3 4 5 6 7 8 9 10 11
let moment = require('moment'); require("moment/min/locales.min"); $(document).ready(function () { let language = $('html').attr('lang'); moment.locale(language); $('.moment').each(function() { date = $(this).text() $(this).text(moment(date).format('LL'))
GitHub: worknenjoy/gitpay

5 6 7 8 9 10 11 12 13 14
const i18n = require('i18n') const constants = require('./constants') const withTemplate = require('./template') const models = require('../../models') // moment.locale('pt-br', ptLocale) const setMomentLocale = (lang) => { if (lang === 'br') { moment.locale('pt-br', ptLocale)
+ 5 other calls in file
GitHub: ryanlelek/Raneto

47 48 49 50 51 52 53 54 55 56
// Set IP Address and Port app.set('host', process.env.HOST || '127.0.0.1'); app.set('port', process.env.PORT || 3000); // set locale as date and time format moment.locale(config.locale); // Setup Views if (!config.theme_dir) { config.theme_dir = path.join(__dirname, '..', 'themes'); } if (!config.theme_name) { config.theme_name = 'default'; }
+ 3 other calls in file
moment.utc is the most popular function in moment (43 examples)