Toli Zaslavskiy Toli Zaslavskiy - 1 year ago 90
Javascript Question

In Moment.js, how do you get the current financial Quarter?

Is there a simple/built in way of figuring out the current financial quarter?


  • Jan-Mar: 1st

  • Apr-Jul: 2nd

  • Jul-Sept: 3rd

  • Oct-Dec: 4th

Answer Source

This is now supported in moment. As easy as:

moment('2014-12-01').utc().quarter() //outputs 4
moment().quarter(); //outputs current quarter ie. 2
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download