- MomentJS Tutorial
- MomentJS - Home
- MomentJS - Overview
- MomentJS - Environment Setup
- MomentJS - Introduction
- MomentJS - Parsing Date And Time
- MomentJS - Date Validation
- MomentJS - Getter/Setter
- Manipulate Date And Time
- Formatting Date And Time
- MomentJS - Date Queries
- MomentJS - Internationalization
- MomentJS - Customization
- MomentJS - Durations
- MomentJS - Utilities
- MomentJS - Plugins
- MomentJS - Examples
- MomentJS Useful Resources
- MomentJS - Quick Guide
- MomentJS - Useful Resources
- MomentJS - Discussion
MomentJS - Using Locale using Node.js
If you happen to use Node.js , you will have the locale files already in moment when you do npm install moment.
Example
Observe the following example that is executed at Node.js end −
Example
"use strict"; var moment = require('moment'); moment.locale('fr'); var k = moment().fromNow(); console.log(k);
Output
momentjs_internationalization.htm
Advertisements
To Continue Learning Please Login
Login with Google