I'd like to create a function to take the current month number (1 to 12) and produce a fiscal quarter i.e. 1, 2, 3 or 4.
A lot of the examples I have found use case statements but this seems over engineered for what I feel should be achievable using math.
I have tried a few different methods but have fallen a little short such as:
function getQuarter(m) { return round(m/4) }
Edit: building on @neil answer the function can be further shortened to:
function getQuarter(m) { return Math.ceil(m/3) }