registration
This commit is contained in:
25
frontend/style/node_modules/date-fns/startOfISOWeekYear.js
generated
vendored
25
frontend/style/node_modules/date-fns/startOfISOWeekYear.js
generated
vendored
@@ -1,8 +1,10 @@
|
||||
"use strict";
|
||||
exports.startOfISOWeekYear = startOfISOWeekYear;
|
||||
var _index = require("./getISOWeekYear.js");
|
||||
var _index2 = require("./startOfISOWeek.js");
|
||||
var _index3 = require("./constructFrom.js");
|
||||
import { constructFrom } from "./constructFrom.js";
|
||||
import { getISOWeekYear } from "./getISOWeekYear.js";
|
||||
import { startOfISOWeek } from "./startOfISOWeek.js";
|
||||
|
||||
/**
|
||||
* The {@link startOfISOWeekYear} function options.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @name startOfISOWeekYear
|
||||
@@ -17,8 +19,10 @@ var _index3 = require("./constructFrom.js");
|
||||
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
||||
*
|
||||
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
||||
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
||||
*
|
||||
* @param date - The original date
|
||||
* @param options - An object with options
|
||||
*
|
||||
* @returns The start of an ISO week-numbering year
|
||||
*
|
||||
@@ -27,10 +31,13 @@ var _index3 = require("./constructFrom.js");
|
||||
* const result = startOfISOWeekYear(new Date(2005, 6, 2))
|
||||
* //=> Mon Jan 03 2005 00:00:00
|
||||
*/
|
||||
function startOfISOWeekYear(date) {
|
||||
const year = (0, _index.getISOWeekYear)(date);
|
||||
const fourthOfJanuary = (0, _index3.constructFrom)(date, 0);
|
||||
export function startOfISOWeekYear(date, options) {
|
||||
const year = getISOWeekYear(date, options);
|
||||
const fourthOfJanuary = constructFrom(options?.in || date, 0);
|
||||
fourthOfJanuary.setFullYear(year, 0, 4);
|
||||
fourthOfJanuary.setHours(0, 0, 0, 0);
|
||||
return (0, _index2.startOfISOWeek)(fourthOfJanuary);
|
||||
return startOfISOWeek(fourthOfJanuary);
|
||||
}
|
||||
|
||||
// Fallback for modularized imports:
|
||||
export default startOfISOWeekYear;
|
||||
|
||||
Reference in New Issue
Block a user