![MomentJS Tutorial](/momentjs/images/momentjs-mini-logo.jpg)
- 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 - As Array
This method will return the params in array form and the values in it will be same as we get for new Date().
Syntax
moment().toArray();
Example
var a = new Date(); var b = moment().toArray();
Output
![As Array](/momentjs/images/as_array.jpg)
momentjs_formatting_date_and_time.htm
Advertisements