index.js 792 B

12345678910111213141516171819202122232425
  1. var isSameISOYear = require('../is_same_iso_year/index.js')
  2. /**
  3. * @category ISO Week-Numbering Year Helpers
  4. * @summary Is the given date in the same ISO week-numbering year as the current date?
  5. *
  6. * @description
  7. * Is the given date in the same ISO week-numbering year as the current date?
  8. *
  9. * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
  10. *
  11. * @param {Date|String|Number} date - the date to check
  12. * @returns {Boolean} the date is in this ISO week-numbering year
  13. *
  14. * @example
  15. * // If today is 25 September 2014,
  16. * // is 30 December 2013 in this ISO week-numbering year?
  17. * var result = isThisISOYear(new Date(2013, 11, 30))
  18. * //=> true
  19. */
  20. function isThisISOYear (dirtyDate) {
  21. return isSameISOYear(new Date(), dirtyDate)
  22. }
  23. module.exports = isThisISOYear