- 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 - Object
Moment can take the date, time units in object form as shown below −
Syntax
moment({unit: value, ...});
Example
var day = moment({ year :2017, month :10, day :3, hour :15, minute :10, second :3, millisecond :123});
Output
momentjs_parsing_date_and_time.htm
Advertisements
To Continue Learning Please Login
Login with Google