calculateYearDifference static method
Implementation
static int calculateYearDifference(DateTime dateA, int xMilliseconds) {
DateTime targetDate = dateA.add(Duration(milliseconds: xMilliseconds));
int yearDiff = dateA.year - targetDate.year;
return yearDiff;
}