Example 3: Let's find difference of years between two dates-"03-02-2013" and "14-04-2015". Unit "y" returns the difference of years between two dates.

Example 4: Let's find difference of days between two dates ignoring years and months-"01-02-2014" and "04-04-2016". Here it returns only 3 value because unit "md" does not consider change in month and years.

Example 5: Let's find difference of months between two dates ignoring years and days-"01-02-2014" and "04-04-2016". Here it returns only 2 value because unit "ym" does not consider change in days and years.

Example 6: Let's find difference of days between two dates ignoring ONLY years.