mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-11 08:31:30 -04:00
2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
![]() |
import{_ as k}from"./chunk-3fb34e39.js";import{_ as q}from"./chunk-606d31d4.js";import{_ as V}from"./chunk-6deddc2e.js";import{a as Z}from"./chunk-a740628f.js";import{w as R}from"./chunk-4d6daddf.js";import{u as L}from"./chunk-340feaf0.js";import{d as B,r as y,aH as K,c as P,j as F,D as O,E as Q,m as M,q as S,S as $,F as ee,U as te}from"./chunk-449c23a2.js";import{aI as _,aJ as w,aK as E}from"../entries/src_pages_Home.page.16dc467b.js";import{a as c,i as b,b as ae}from"./chunk-3b46fb01.js";import{_ as re}from"./chunk-b6d0d6dd.js";import"./chunk-3db18d93.js";import"./chunk-767079b6.js";import"./chunk-a3974c29.js";import"./chunk-27eb844d.js";import"./chunk-9a43cce8.js";import"./chunk-cf010ec4.js";import"./chunk-ee54c1e8.js";import"./chunk-fd51fbd2.js";var Y=6e4,H=36e5;function ne(t,e){var n,a;_(1,arguments);var o=w(t);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var i=String((n=e?.format)!==null&&n!==void 0?n:"extended"),u=String((a=e?.representation)!==null&&a!==void 0?a:"complete");if(i!=="extended"&&i!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(u!=="date"&&u!=="time"&&u!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var l="",m="",d=i==="extended"?"-":"",r=i==="extended"?":":"";if(u!=="time"){var s=c(o.getDate(),2),p=c(o.getMonth()+1,2),h=c(o.getFullYear(),4);l="".concat(h).concat(d).concat(p).concat(d).concat(s)}if(u!=="date"){var v=o.getTimezoneOffset();if(v!==0){var g=Math.abs(v),f=c(Math.floor(g/60),2),T=c(g%60,2),C=v<0?"+":"-";m="".concat(C).concat(f,":").concat(T)}else m="Z";var U=c(o.getHours(),2),J=c(o.getMinutes(),2),W=c(o.getSeconds(),2),j=l===""?"":"T",X=[U,J,W].join(r);l="".concat(l).concat(j).concat(X).concat(m)}return l}function oe(t,e){var n,a;if(arguments.length<1)throw new TypeError("1 argument required, but only ".concat(arguments.length," present"));var o=w(t);if(!b(o))throw new RangeError("Invalid time value");var i=String((n=e?.format)!==null&&n!==void 0?n:"extended"),u=String((a=e?.representation)!==null&&a!==void 0?a:"complete");if(i!=="extended"&&i!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(u!=="date"&&u!=="time"&&u!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var l="",m=i==="extended"?"-":"",d=i==="extended"?":":"";if(u!=="time"){var r=c(o.getDate(),2),s=c(o.getMonth()+1,2),p=c(o.getFullYear(),4);l="".concat(p).concat(m).concat(s).concat(m).concat(r)}if(u!=="date"){var h=c(o.getHours(),2),v=c(o.getMinutes(),2),g=c(o.getSeconds(),2),f=l===""?"":" ";l="".concat(l).concat(f).concat(h).concat(d).concat(v).concat(d).concat(g)}return l}function ie(t,e){var n;if(arguments.length<1)throw new TypeError("1 arguments required, but only ".concat(arguments.length," present"));var a=w(t);if(!b(a))throw new RangeError("Invalid time value");var o=Number((n=e?.fractionDigits)!==null&&n!==void 0?n:0);if(!(o>=0&&o<=3))throw new RangeError("fractionDigits must be between 0 and 3 inclusively");var i=c(a.getDate(),2),u=c(a.getMonth()+1,2),l=a.getFullYear(),m=c(a.getHours(),2),d=c(a.getMinutes(),2),r=c(a.getSeconds(),2),s="";if(o>0){var p=a.getMilliseconds(),h=Math.floor(p*Math.pow(10,o-3));s="."+c(h,o)}var v="",g=a.getTimezoneOffset();if(g!==0){var f=Math.abs(g),T=c(E(f/60),2),C=c(f%60,2),U=g<0?"+":"-";v="".concat(U).concat(T,":").concat(C)}else v="Z";return"".concat(l,"-").concat(u,"-").concat(i,"T").concat(m,":").concat(d,":").concat(r).concat(s).concat(v)}var ce=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],se=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ue(t){if(arguments.length<1)throw new TypeError("1 arguments required, but only ".concat(arguments.length," present"));var e=w(t);if(!b(e))throw new RangeError("Invalid time value");var n=ce[e.getUTCDay()],a=c(e.getUTCDate(),2),o=se[e.getUTCMonth()],i=e.getUTCFullYear(),u=c(e.getUTCHours(),2),l=c(e.getUTCMinutes(),2),m=c(e.getUTCSeconds(),2);return"".concat(n,", ").concat(a," ").concat(o," ").concat(i," ").concat(u,":").concat(l,":").concat(m," GMT")}function le(
|