Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Determine if a (due) date is between two other dates

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2024

Hi,

I want to now if the due date is between two other dates (startDate & endDate).

The startDate and endDate are in a variable (obtained via a web request). According to the documentation I can use isAfter to determine if the duedate is after the startDate.

{{startDate.toDate.format("yyyy-MM-dd").isAfter(issue.duedate)}}

 

And this to see if endDate is before the duedate

 

{{endDate.toDate.format("yyyy-MM-dd").isBefore(issue.duedate)}}

 

I also tried diff & compareTo but it does not work.

How can I accomplisch this?

1 answer

0 votes
Ponnappan Ganapathiya
Contributor
September 6, 2024

Hi Rudy,

If you are trying to get the value for if/else block, then you can use Advanced comparison condition, right. I think its {{smart values}} condition in cloud.

Rudy Holtkamp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 6, 2024

It's a bit more complex since I have to iterate over a list in a JSON object.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events