- 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 - Quarter
This method will get and set the quarter. The range is 1-4. Inputs greater than the range will fall in the next year and less will fall in the previous years.
Syntax
moment().quarter(); moment().quarter(Number); moment().quarters(); moment().quarters(Number);
Example
var m = moment().quarter(); var d = moment().quarter(3); var a = moment().quarter(6); var k = moment().quarter(-1);
Output
momentjs_getter_setter.htm
Advertisements