Search code examples
javascriptcountdown

javascript Countdown timer with weeks and months


I need a countdown script to calculate the difference between two dates, in months, weeks, and days.
I know about timespan.js and countdown.js, but those scripts only work with days.
What script could I use for months and weeks?
preferable the dates are in the yyyy-mm-dd format


Solution

  • How about moment.js? There is probably a 'months' feature? https://www.google.com/search?client=safari&rls=en&q=moment.js+difference+between+two+dates+in+months&ie=UTF-8&oe=UTF-8