JavaScript/Date calculator

To calculate the difference between dates, the entered dates are first converted to Unix epoch time stamps, counting up from January 1, 1970. Then, the difference in seconds is converted back to days.

In order to return a positive value, the time stamps are then compared so the earlier time stamp is subtracted from the more recent one.

At the end, an object is generated which contains the number of days and a custom-generated text. It is stored into a variable so it can be alerted to the user.

The supported input date formats are " ", " " (with and without comma), and " ". For example,  returns. The worded month can optionally be written out. Make sure not to miss quotation marks (both  and   work), so the entered dates are interpreted as strings.