Hi!
Is there any way to get quarter of the year based on date in script runner?
I can set format for year/month/date like year=today.format("YYYY") and maybe there is something like quater=today.format("Q").
Regards,
Seba
Hey @Sebastian Krzewiński ,
I don't think there is a specific one like that, but if you have some kind of logic to define it nicely, it should be possible for you to format it in a way that it looks like "YYYY, QX"
I mean, if you wanted to display it in a scripted field, you could possibly define something like:
def quarter if (month >= 1 && month <= 3) {
quarter = "Q1"
} else if (month >= 4 && month <= 6) {
quarter = "Q2"
} else if (month >= 7 && month <= 9) {
quarter = "Q3"
} else if (month >= 10 && month <= 12) {
quarter = "Q4"
Let me know how that works out for you.
Regards,
Sean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.