Toli Zaslavskiy Toli Zaslavskiy - 5 months ago 56
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


This is now supported in moment. As easy as:

moment('2014-12-01').utc().quarter() //outputs 4
moment().quarter(); //outputs current quarter ie. 2