【英文】Nodejs的moment模块学习笔记
Introduction
Formatting time and date using the moment module in Node.js.
Download Dependencies
1 | npm install moment |
Time and Date Formatting
- Use the
moment()
function to get the current time. - Use the
format()
function to format the time.
1 | const moment = require("moment"); |