27 lines
1.0 KiB
JavaScript
27 lines
1.0 KiB
JavaScript
// Metro module 3525 (f3526).
|
|
import * as _requiredArgs from "./requiredArgs";
|
|
import { __esModule } from "./requiredArgs";
|
|
let c1877_0;
|
|
const _typeof2 = function _typeof(a0) {
|
|
_typeof2 = typeof globalThis.Symbol === "function" && typeof Symbol.iterator === "symbol" ? function _typeof(a0) {
|
|
return typeof a0;
|
|
} : function _typeof(a0) {
|
|
return a0 && typeof globalThis.Symbol === "function" && a0.constructor === Symbol ? a0 === Symbol.prototype ? typeof a0 : "symbol" : typeof a0;
|
|
};
|
|
return _typeof2(a0);
|
|
};
|
|
export default function formatISODuration(a0) {
|
|
(0, c1877_0.default)(1, arguments);
|
|
if (_typeof2(a0) !== "object") {
|
|
throw new Error("Duration must be an object");
|
|
}
|
|
const { years = 0, months = 0, days = 0, hours = 0, minutes = 0, seconds = 0 } = a0;
|
|
return "P".concat(years, "Y").concat(months, "M").concat(days, "DT").concat(hours, "H").concat(minutes, "M").concat(seconds, "S");
|
|
};
|
|
c1877_0 = _requiredArgs ? __esModule ? _requiredArgs : {
|
|
default: _requiredArgs
|
|
} : {
|
|
default: _requiredArgs
|
|
};
|
|
module.exports = exports.default;
|