UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

24 lines (17 loc) 694 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var index$1 = require('../startOfUTCISOWeek/index.js'); var index = require('../getUTCISOWeekYear/index.js'); // See issue: https://github.com/date-fns/date-fns/issues/376 function startOfUTCISOWeekYear(dirtyDate) { if (arguments.length < 1) { throw new TypeError('1 argument required, but only ' + arguments.length + ' present'); } var year = index.default(dirtyDate); var fourthOfJanuary = new Date(0); fourthOfJanuary.setUTCFullYear(year, 0, 4); fourthOfJanuary.setUTCHours(0, 0, 0, 0); var date = index$1.default(fourthOfJanuary); return date; } exports.default = startOfUTCISOWeekYear;