This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ☃ dateDiff "Snowman Carl" (http://stackoverflow.com/questions/13903897) | |
* Returns a detail object about the difference between two dates | |
* | |
* When providing custom units, provide them in descending order (eg week,day,hour; not hour,day,week) | |
* | |
* @param {Date} dateStart - date to compare to | |
* @param {Date|string} [dateEnd=new Date()] - second date, can be used as unit param instead | |
* @param {...string} [units=Object.keys(dateDiffDef)] - limits the returned object to provided keys | |
*/ |
NewerOlder