PageSourceSearch

https://app.clariumhealth.com/assets/subDays-vez96V8M.js

js clariumhealth.com collected 2026-09-25 15:15:26 UTC 2,270 bytes, 51 lines download raw bytes

1import { t as _typeof } from "./typeof-CtObx4yR.js";
2function toInteger(dirtyNumber) {
3	if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) return NaN;
4	var number = Number(dirtyNumber);
5	if (isNaN(number)) return number;
6	return number < 0 ? Math.ceil(number) : Math.floor(number);
7}
8function requiredArgs(required, args) {
9	if (args.length < required) throw new TypeError(required + " argument" + (required > 1 ? "s" : "") + " required, but only " + args.length + " present");
10}
11function toDate(argument) {
12	requiredArgs(1, arguments);
13	var argStr = Object.prototype.toString.call(argument);
14	if (argument instanceof Date || _typeof(argument) === "object" && argStr === "[object Date]") return new Date(argument.getTime());
15	else if (typeof argument === "number" || argStr === "[object Number]") return new Date(argument);
16	else {
17		if ((typeof argument === "string" || argStr === "[object String]") && typeof console !== "undefined") {
18			console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
19			console.warn((/* @__PURE__ */ new Error()).stack);
20		}
21		return /* @__PURE__ */ new Date(NaN);
22	}
23}
24function addDays(dirtyDate, dirtyAmount) {
25	requiredArgs(2, arguments);
26	var date = toDate(dirtyDate);
27	var amount = toInteger(dirtyAmount);
28	if (isNaN(amount)) return /* @__PURE__ */ new Date(NaN);
29	if (!amount) return date;
30	date.setDate(date.getDate() + amount);
31	return date;
32}
33function startOfDay(dirtyDate) {
34	requiredArgs(1, arguments);
35	var date = toDate(dirtyDate);
36	date.setHours(0, 0, 0, 0);
37	return date;
38}
39function isSameDay(dirtyDateLeft, dirtyDateRight) {
40	requiredArgs(2, arguments);
41	var dateLeftStartOfDay = startOfDay(dirtyDateLeft);
42	var dateRightStartOfDay = startOfDay(dirtyDateRight);
43	return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
44}
45function subDays(dirtyDate, dirtyAmount) {
46	requiredArgs(2, arguments);
47	return addDays(dirtyDate, -toInteger(dirtyAmount));
48}
49export { toDate as a, addDays as i, isSameDay as n, requiredArgs as o, startOfDay as r, toInteger as s, subDays as t };
50
51//# sourceMappingURL=subDays-vez96V8M.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.