You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					28 lines
				
				959 B
			
		
		
			
		
	
	
					28 lines
				
				959 B
			| 
								 
											3 years ago
										 
									 | 
							
								"use strict";
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Object.defineProperty(exports, "__esModule", {
							 | 
						||
| 
								 | 
							
								  value: true
							 | 
						||
| 
								 | 
							
								});
							 | 
						||
| 
								 | 
							
								exports.default = startOfUTCISOWeekYear;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var _index = _interopRequireDefault(require("../getUTCISOWeekYear/index.js"));
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var _index2 = _interopRequireDefault(require("../startOfUTCISOWeek/index.js"));
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								var _index3 = _interopRequireDefault(require("../requiredArgs/index.js"));
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// This function will be a part of public API when UTC function will be implemented.
							 | 
						||
| 
								 | 
							
								// See issue: https://github.com/date-fns/date-fns/issues/376
							 | 
						||
| 
								 | 
							
								function startOfUTCISOWeekYear(dirtyDate) {
							 | 
						||
| 
								 | 
							
								  (0, _index3.default)(1, arguments);
							 | 
						||
| 
								 | 
							
								  var year = (0, _index.default)(dirtyDate);
							 | 
						||
| 
								 | 
							
								  var fourthOfJanuary = new Date(0);
							 | 
						||
| 
								 | 
							
								  fourthOfJanuary.setUTCFullYear(year, 0, 4);
							 | 
						||
| 
								 | 
							
								  fourthOfJanuary.setUTCHours(0, 0, 0, 0);
							 | 
						||
| 
								 | 
							
								  var date = (0, _index2.default)(fourthOfJanuary);
							 | 
						||
| 
								 | 
							
								  return date;
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								module.exports = exports.default;
							 |