Question
Bits in Glass
Bits in Glass
IN
Bits in Glass
Posted: Feb 2, 2024
Last activity: Feb 6, 2024
Last activity: 6 Feb 2024 4:34 EST
Solved
Difference Between the Two Dates
As a pega developer, I want to create a function that calculates the difference between two dates in years, months, and days so that I can display the result in the user interface.
Acceptance criteria:
- The function takes two parameters: the start date and the end date, which are valid date values.
- The function returns a string that shows the difference between the two dates in the format of “X years, Y months, Z days.”.
- The function handles edge cases such as leap years, invalid dates, or negative differences.
- The function is tested with various input values and expected outputs.
***Edited by Moderator Rupashree to add Capability tags***