In a Jira automation, I'm pulling the date from the due date field, converting it to a year-quarter format, and adding it as a label (if not already present).
Ex: If the due date is December 31, 2024, then the automation should add the label '2024Q4'
The automation is working fine so far except for December 31, 2024.
I've been burned by how Jira stores dates in GMT before, but what's weirder to me is that it's inconsistent here.
The Jira Smart Value (setting a variable in the automation):
{{duedate.format("YYYY")}}Q{{duedate.format("Q")}}If 2024-12-31 is getting stored as 2025-01-01 GMT under the hood, I can understand why the YYYY format would return 2025.
What doesn't make sense to me is that the value above is returning 2025Q4.
Why would .format("YYYY") return 2025 if .format("Q") is still returning Q4?
Related: Jira dates smart values documentation