jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
24 lines (17 loc) • 694 B
JavaScript
;
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;