Fiscal Quarters
If you ever have need for Fiscal, Calendar or Academic quarters, you can use the moment-fquarter plugin by @robgallen.
At its simplest, just call the fquarter method on any moment object. It returns a formatted string with April being the first quarter.
moment("2013-01-01").fquarter();
// Q4 2012/13
You can pass in any month as the starting quarter, e.g. July
moment("2013-01-01").fquarter(7);
// Q3 2012/13
If you want calendar quarters, start in January
moment("2013-01-01").fquarter(1);
// Q1 2013
当前内容版权归 momentjs.com 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 momentjs.com .