Skip to content
Advertisement

Creating a series of Quarters

Let say I have a date

JavaScript

Now starting from mydate, I want to create an array of 10 quarters e.g. 2020-Q1, 2020-Q2, ... [total 10 values]

Is there any direct way to achieve this?

In R, this is pretty straightforward, as I can use seq() function to generate the same.

Any pointer will be very helpful

Advertisement

Answer

it doesnt give you the exact format … but probably close enough

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement