Files
doneit-web/.angular/cache/14.2.12/babel-webpack/3ba97156d5a4d096ef559c61d83df5db.json
T
Eudes Inácio 53b71ea16f its working
2023-06-30 09:54:21 +01:00

1 line
10 KiB
JSON

{"ast":null,"code":"import toDate from \"../toDate/index.js\";\nimport isValid from \"../isValid/index.js\";\nimport addLeadingZeros from \"../_lib/addLeadingZeros/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n\n/**\n * @name formatRFC3339\n * @category Common Helpers\n * @summary Format the date according to the RFC 3339 standard (https://tools.ietf.org/html/rfc3339#section-5.6).\n *\n * @description\n * Return the formatted date string in RFC 3339 format. Options may be passed to control the parts and notations of the date.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {0|1|2|3} [options.fractionDigits=0] - number of digits after the decimal point after seconds\n * @returns {String} the formatted date string\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.fractionDigits` must be between 0 and 3\n *\n * @example\n * // Represent 18 September 2019 in RFC 3339 format:\n * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52))\n * //=> '2019-09-18T19:00:52Z'\n *\n * @example\n * // Represent 18 September 2019 in RFC 3339 format, 2 digits of second fraction:\n * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 2 })\n * //=> '2019-09-18T19:00:52.23Z'\n *\n * @example\n * // Represent 18 September 2019 in RFC 3339 format, 3 digits of second fraction\n * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 3 })\n * //=> '2019-09-18T19:00:52.234Z'\n */\nexport default function formatRFC3339(dirtyDate, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError(\"1 arguments required, but only \".concat(arguments.length, \" present\"));\n }\n var originalDate = toDate(dirtyDate);\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n }\n var _ref = dirtyOptions || {},\n _ref$fractionDigits = _ref.fractionDigits,\n fractionDigits = _ref$fractionDigits === void 0 ? 0 : _ref$fractionDigits; // Test if fractionDigits is between 0 and 3 _and_ is not NaN\n\n if (!(fractionDigits >= 0 && fractionDigits <= 3)) {\n throw new RangeError('fractionDigits must be between 0 and 3 inclusively');\n }\n var day = addLeadingZeros(originalDate.getDate(), 2);\n var month = addLeadingZeros(originalDate.getMonth() + 1, 2);\n var year = originalDate.getFullYear();\n var hour = addLeadingZeros(originalDate.getHours(), 2);\n var minute = addLeadingZeros(originalDate.getMinutes(), 2);\n var second = addLeadingZeros(originalDate.getSeconds(), 2);\n var fractionalSecond = '';\n if (fractionDigits > 0) {\n var milliseconds = originalDate.getMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, fractionDigits - 3));\n fractionalSecond = '.' + addLeadingZeros(fractionalSeconds, fractionDigits);\n }\n var offset = '';\n var tzOffset = originalDate.getTimezoneOffset();\n if (tzOffset !== 0) {\n var absoluteOffset = Math.abs(tzOffset);\n var hourOffset = addLeadingZeros(toInteger(absoluteOffset / 60), 2);\n var minuteOffset = addLeadingZeros(absoluteOffset % 60, 2); // If less than 0, the sign is +, because it is ahead of time.\n\n var sign = tzOffset < 0 ? '+' : '-';\n offset = \"\".concat(sign).concat(hourOffset, \":\").concat(minuteOffset);\n } else {\n offset = 'Z';\n }\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day, \"T\").concat(hour, \":\").concat(minute, \":\").concat(second).concat(fractionalSecond).concat(offset);\n}","map":{"version":3,"names":["toDate","isValid","addLeadingZeros","toInteger","formatRFC3339","dirtyDate","dirtyOptions","arguments","length","TypeError","concat","originalDate","RangeError","_ref","_ref$fractionDigits","fractionDigits","day","getDate","month","getMonth","year","getFullYear","hour","getHours","minute","getMinutes","second","getSeconds","fractionalSecond","milliseconds","getMilliseconds","fractionalSeconds","Math","floor","pow","offset","tzOffset","getTimezoneOffset","absoluteOffset","abs","hourOffset","minuteOffset","sign"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/date-fns/esm/formatRFC3339/index.js"],"sourcesContent":["import toDate from \"../toDate/index.js\";\nimport isValid from \"../isValid/index.js\";\nimport addLeadingZeros from \"../_lib/addLeadingZeros/index.js\";\nimport toInteger from \"../_lib/toInteger/index.js\";\n\n/**\n * @name formatRFC3339\n * @category Common Helpers\n * @summary Format the date according to the RFC 3339 standard (https://tools.ietf.org/html/rfc3339#section-5.6).\n *\n * @description\n * Return the formatted date string in RFC 3339 format. Options may be passed to control the parts and notations of the date.\n *\n * @param {Date|Number} date - the original date\n * @param {Object} [options] - an object with options.\n * @param {0|1|2|3} [options.fractionDigits=0] - number of digits after the decimal point after seconds\n * @returns {String} the formatted date string\n * @throws {TypeError} 1 argument required\n * @throws {RangeError} `date` must not be Invalid Date\n * @throws {RangeError} `options.fractionDigits` must be between 0 and 3\n *\n * @example\n * // Represent 18 September 2019 in RFC 3339 format:\n * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52))\n * //=> '2019-09-18T19:00:52Z'\n *\n * @example\n * // Represent 18 September 2019 in RFC 3339 format, 2 digits of second fraction:\n * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 2 })\n * //=> '2019-09-18T19:00:52.23Z'\n *\n * @example\n * // Represent 18 September 2019 in RFC 3339 format, 3 digits of second fraction\n * const result = formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), { fractionDigits: 3 })\n * //=> '2019-09-18T19:00:52.234Z'\n */\nexport default function formatRFC3339(dirtyDate, dirtyOptions) {\n if (arguments.length < 1) {\n throw new TypeError(\"1 arguments required, but only \".concat(arguments.length, \" present\"));\n }\n\n var originalDate = toDate(dirtyDate);\n\n if (!isValid(originalDate)) {\n throw new RangeError('Invalid time value');\n }\n\n var _ref = dirtyOptions || {},\n _ref$fractionDigits = _ref.fractionDigits,\n fractionDigits = _ref$fractionDigits === void 0 ? 0 : _ref$fractionDigits; // Test if fractionDigits is between 0 and 3 _and_ is not NaN\n\n\n if (!(fractionDigits >= 0 && fractionDigits <= 3)) {\n throw new RangeError('fractionDigits must be between 0 and 3 inclusively');\n }\n\n var day = addLeadingZeros(originalDate.getDate(), 2);\n var month = addLeadingZeros(originalDate.getMonth() + 1, 2);\n var year = originalDate.getFullYear();\n var hour = addLeadingZeros(originalDate.getHours(), 2);\n var minute = addLeadingZeros(originalDate.getMinutes(), 2);\n var second = addLeadingZeros(originalDate.getSeconds(), 2);\n var fractionalSecond = '';\n\n if (fractionDigits > 0) {\n var milliseconds = originalDate.getMilliseconds();\n var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, fractionDigits - 3));\n fractionalSecond = '.' + addLeadingZeros(fractionalSeconds, fractionDigits);\n }\n\n var offset = '';\n var tzOffset = originalDate.getTimezoneOffset();\n\n if (tzOffset !== 0) {\n var absoluteOffset = Math.abs(tzOffset);\n var hourOffset = addLeadingZeros(toInteger(absoluteOffset / 60), 2);\n var minuteOffset = addLeadingZeros(absoluteOffset % 60, 2); // If less than 0, the sign is +, because it is ahead of time.\n\n var sign = tzOffset < 0 ? '+' : '-';\n offset = \"\".concat(sign).concat(hourOffset, \":\").concat(minuteOffset);\n } else {\n offset = 'Z';\n }\n\n return \"\".concat(year, \"-\").concat(month, \"-\").concat(day, \"T\").concat(hour, \":\").concat(minute, \":\").concat(second).concat(fractionalSecond).concat(offset);\n}"],"mappings":"AAAA,OAAOA,MAAM,MAAM,oBAAoB;AACvC,OAAOC,OAAO,MAAM,qBAAqB;AACzC,OAAOC,eAAe,MAAM,kCAAkC;AAC9D,OAAOC,SAAS,MAAM,4BAA4B;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,aAAaA,CAACC,SAAS,EAAEC,YAAY,EAAE;EAC7D,IAAIC,SAAS,CAACC,MAAM,GAAG,CAAC,EAAE;IACx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