Time Elapsed Code

I was looking for some code (javascript) to find the time difference between a specific date and today i.e. it dynamically changes every day.

Every example I saw used the method of breaking the difference into seconds and then building back into days/month/years. The difficulty this caused was how to handle 'Leap Years'.

I tried a different approach, which appears to work (so far). Rather than break the time down to seconds I broke it  down between the three time periods (D/M/Y) and calculated the difference between each component.

The only factor to handle was where the current date was in the year in relation to the date from, and calculate the difference. Here is the time elapsed since 14 March 1977, to view the code use [CTRL + U].