Hello, friends!
{{issue.customfield_11111.diff(now).months}} - returns integer number of months.
Is there any way to get float number of month?
Or can i get difference between 2 dates without year ?
F.e. difference between 01/02/20 and 10/02/20 without year = 9 days
Thank you in Advance.
Calculating difference in dates... the devil is in the details.
See this StackOverflow thread for various ways to do so: https://stackoverflow.com/questions/1555262/calculating-the-difference-between-two-java-date-instances
Scroll down to find the more updated answers. I recommend the one using classes Instant and Duration.
thank you!
but is there any way to integrate java code to standart jira cloud without plugins?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't see anyway that you would be able to do the second one.
And what do you mean by "float number of months"?
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.
Adding onto John's answers and questions...
What problem are you trying to solve with fractional months? The fractional values are not comparable for months with differing numbers of days 28, 29, 30, or 31, right?
For your question about just days-differences, do you mean you have two literal date values or that those are from issue fields? If literal, try putting the dates into created variables first. If issue fields, why not just do a days diff()?
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.