calculate difference between two dates in years, months, and days#1756
calculate difference between two dates in years, months, and days#1756juhikumarimodi6 wants to merge 3 commits intoServiceNowDevProgram:mainfrom juhikumarimodi6:dateDifference
Conversation
|
ServiceNowDevProgram/ActionPack#37 You can take the other one too which is similar to this |
|
Thank you for your submission. Can you add more information in the description? From your code and the title it now seems you are calculating the difference between two dates. There is already a function available "GlideDateTime - subtract(GlideDateTime start, GlideDateTime end)" to do this, documented in the docs here: It returns a GlideDuration -> Duration difference between the two specified dates. Example: var dur = GlideDateTime.subtract(gdt1, gdt2); // Difference between gdt1 and gdt2 Output: I am closing this PR for now. |
DescriptionThis function calculates the difference between two dates and returns the result in calendar components:
While |
PR Description:
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions