2026-05-12
This commit is contained in:
1
training/codes/training-system-frontend/dist/assets/js/format-D1rp7NC7.js
vendored
Normal file
1
training/codes/training-system-frontend/dist/assets/js/format-D1rp7NC7.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function g(e,r="YYYY-MM-DD"){if(!e)return"-";const t=new Date(e);if(isNaN(t.getTime()))return"-";const a=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),c=String(t.getSeconds()).padStart(2,"0");return r.replace("YYYY",String(a)).replace("MM",n).replace("DD",o).replace("HH",i).replace("mm",s).replace("ss",c)}function p(e){return g(e,"YYYY-MM-DD HH:mm")}function l(e){if(e===0)return"0 B";const r=1024,t=["B","KB","MB","GB","TB"],a=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,a)).toFixed(2))+" "+t[a]}export{p as a,l as b,g as f};
|
||||
Reference in New Issue
Block a user