intuit / intuit/common-xtext-expression-language
Get difference in days/weeks/months/years between 2 dates
Open
easy
enhancement
- Dominant language
- Java
- Stars
- 11
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Given 2 dates, the function should return the difference in days/weeks/months/years
**Describe the solution you'd like**
Given 2 dates in a given format, I should be able to get the difference in either DAYS/WEEKS/MONTHS/YEAR.
Syntax: dateDifference(input1, input2, format, chronoUnit)
ChronoUnit values:
DAYS
WEEKS
MONTHS
YEARS
Formats it should support:
MM/dd/yyyy
yyyyMMdd
yyyy-MM-dd
Open to other suggestions for syntax
Contributor guide
Assessment
This issue has not been assessed yet.