decord/source/3593_formatRFC7231.js

67 lines
2.2 KiB
JavaScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 3593
// Function ID: 3594
2026-07-23 10:11:24 +00:00
// Name: formatRFC7231
2026-08-05 07:35:12 +00:00
// Dependencies: [3334, 3516, 3577]
2026-07-23 10:11:24 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 3593 (formatRFC7231)
2026-07-23 10:11:24 +00:00
import _typeof from "_typeof";
import isValid from "isValid";
import addLeadingZeros from "addLeadingZeros";
2026-07-29 08:29:29 +00:00
if (!_typeof) {
let obj = { default: null };
obj[0] = _typeof;
let tmp3 = obj;
} else {
tmp3 = _typeof;
}
let c0 = tmp3;
if (!isValid) {
obj = { default: null };
obj[0] = isValid;
let tmp5 = obj;
} else {
tmp5 = isValid;
}
let closure_1 = tmp5;
if (!addLeadingZeros) {
obj = { default: null };
obj[0] = addLeadingZeros;
let tmp7 = obj;
} else {
tmp7 = addLeadingZeros;
}
2026-07-23 10:11:24 +00:00
let closure_3 = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
let closure_4 = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
2026-07-29 08:29:29 +00:00
export default function formatRFC7231(arg0) {
2026-07-23 10:11:24 +00:00
if (arguments.length < 1) {
const _TypeError = TypeError;
const concat2 = "1 arguments required, but only ".concat;
const typeError = new TypeError("1 arguments required, but only ".concat(arguments.length, " present"));
throw typeError;
} else {
2026-07-29 08:29:29 +00:00
const defaultResult = tmp3.default(arg0);
if (tmp5.default(defaultResult)) {
2026-07-23 10:11:24 +00:00
const uTCFullYear = defaultResult.getUTCFullYear();
2026-07-29 08:29:29 +00:00
const defaultResult1 = tmp7.default(defaultResult.getUTCDate(), 2);
const defaultResult2 = tmp7.default(defaultResult.getUTCHours(), 2);
2026-07-23 10:11:24 +00:00
const concat = "".concat;
2026-07-29 08:29:29 +00:00
const defaultResult3 = tmp7.default(defaultResult.getUTCMinutes(), 2);
2026-07-23 10:11:24 +00:00
const combined = "".concat(table[defaultResult.getUTCDay(defaultResult)], ", ");
const combined1 = combined.concat(defaultResult1, " ");
const combined2 = combined1.concat(table2[defaultResult.getUTCMonth(defaultResult)], " ");
const combined3 = combined2.concat(uTCFullYear, " ");
const combined4 = combined3.concat(defaultResult2, ":");
const combined5 = combined4.concat(defaultResult3, ":");
2026-07-29 08:29:29 +00:00
return combined5.concat(tmp7.default(defaultResult.getUTCSeconds(), 2), " GMT");
2026-07-23 10:11:24 +00:00
} else {
const _RangeError = RangeError;
const rangeError = new RangeError("Invalid time value");
throw rangeError;
}
}
};
export default exports.default;