const n=[{unit:"year",duration:315576e5},{unit:"month",duration:26298e5},{unit:"week",duration:6048e5},{unit:"day",duration:864e5},{unit:"hour",duration:36e5},{unit:"minute",duration:6e4},{unit:"second",duration:1e3}];function t(t,e,r){const u=function(n,t){if("RelativeTimeFormat"in Intl)return(t,e)=>new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(-t,e);return t}(t,e);return function(t){const e=new Date(t).getTime(),i=(new Date).getTime()-e;for(const{unit:t,duration:e}of n){const n=i/e,r=Math.round(n);if(n>=1)return u(r,t)}return r}}function e(n){return o(new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"}))}function r(n){return o(new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}))}function u(n){return o(new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"}))}function i(n){return o(new Intl.DateTimeFormat(n,{hour:"numeric"}))}function o(n){return t=>n.format(new Date(t))}export{e as prepareFormatDate,u as prepareFormatDateOnly,r as prepareFormatDatetime,t as prepareFormatDistanceToNow,i as prepareFormatHours};
//# sourceMappingURL=i18n-date.js.map
