intuit / intuit/common-xtext-expression-language

Get difference in days/weeks/months/years between 2 dates

Open
#32 1 comment 0 reactions 1 assignee Claimed by @nancyp321 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.