- MomentJS 教程
- MomentJS - 主頁
- MomentJS - 概述
- MomentJS - 環境設定
- MomentJS - 簡介
- MomentJS - 解析日期和時間
- MomentJS - 日期驗證
- MomentJS - 獲取器/設定器
- 操作日期和時間
- 格式化日期和時間
- MomentJS - 日期查詢
- MomentJS - 國際化
- MomentJS - 自定義
- MomentJS - Duration
- MomentJS - 實用程式
- MomentJS - 外掛
- MomentJS - 示例
- MomentJS 有用資源
- MomentJS - 快速指南
- MomentJS - 有用資源
- MomentJS - 討論
MomentJS - 使用 Node.js 使用區域設定
如果您碰巧使用 Node.js,在執行 npm install moment 時它將在 moment 中已具有區域設定檔案。
示例
觀察在 Node.js 末尾執行的以下示例 -
示例
"use strict";
var moment = require('moment');
moment.locale('fr');
var k = moment().fromNow();
console.log(k);
輸出
momentjs_internationalization.htm
廣告