aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/date-fns/_lib/setUTCDay/index.js
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-29 11:49:28 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-29 11:49:28 -0700
commitd55b767039605256c736166a942a9138e3eacfd7 (patch)
tree947063b634c50d438a794325f13275e134aa5993 /node_modules/date-fns/_lib/setUTCDay/index.js
parent864ce67d89c77d8ef9c3361f80d619853abcf91c (diff)
remove dev node_modules (oops)
Diffstat (limited to 'node_modules/date-fns/_lib/setUTCDay/index.js')
-rw-r--r--node_modules/date-fns/_lib/setUTCDay/index.js31
1 files changed, 0 insertions, 31 deletions
diff --git a/node_modules/date-fns/_lib/setUTCDay/index.js b/node_modules/date-fns/_lib/setUTCDay/index.js
deleted file mode 100644
index 43714fe..0000000
--- a/node_modules/date-fns/_lib/setUTCDay/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-"use strict";
-
-var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = setUTCDay;
-var _index = _interopRequireDefault(require("../../toDate/index.js"));
-var _index2 = _interopRequireDefault(require("../requiredArgs/index.js"));
-var _index3 = _interopRequireDefault(require("../toInteger/index.js"));
-var _index4 = require("../defaultOptions/index.js");
-function setUTCDay(dirtyDate, dirtyDay, options) {
- var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
- (0, _index2.default)(2, arguments);
- var defaultOptions = (0, _index4.getDefaultOptions)();
- var weekStartsOn = (0, _index3.default)((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
-
- // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
- if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
- throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
- }
- var date = (0, _index.default)(dirtyDate);
- var day = (0, _index3.default)(dirtyDay);
- var currentDay = date.getUTCDay();
- var remainder = day % 7;
- var dayIndex = (remainder + 7) % 7;
- var diff = (dayIndex < weekStartsOn ? 7 : 0) + day - currentDay;
- date.setUTCDate(date.getUTCDate() + diff);
- return date;
-}
-module.exports = exports.default; \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage