PageSourceSearch

https://toolbreezy.com/_next/static/chunks/60317-fc8ca679674cadb1.js

js toolbreezy.com collected 2026-09-24 14:59:01 UTC 31,680 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[60317],{60317:(e,t,a)=>{a.r(t),a.d(t,{buildShareLink:()=>Y,default:()=>G});var s=a(95155),n=a(12115),r=a(33789),l=a(97003),i=a(90235),o=a(67001),d=a(33534),c=a(69869),u=a(27784),m=a(25016);let h=[{letter:"t",name:"Short Time",docsExample:"16:20",options:{hour:"numeric",minute:"2-digit"}},{letter:"T",name:"Medium Time",docsExample:"16:20:30",options:{hour:"numeric",minute:"2-digit",second:"2-digit"}},{letter:"d",name:"Short Date",docsExample:"20/04/2021",options:{year:"numeric",month:"2-digit",day:"2-digit"}},{letter:"D",name:"Long Date",docsExample:"April 20, 2021",options:{year:"numeric",month:"long",day:"numeric"}},{letter:"f",name:"Long Date, Short Time",docsExample:"April 20, 2021 at 16:20",options:{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"},isDefault:!0},{letter:"F",name:"Full Date, Short Time",docsExample:"Tuesday, April 20, 2021 at 16:20",options:{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"}},{letter:"s",name:"Short Date, Short Time",docsExample:"20/04/2021, 16:20",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"2-digit"}},{letter:"S",name:"Short Date, Medium Time",docsExample:"20/04/2021, 16:20:30",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"2-digit",second:"2-digit"}},{letter:"R",name:"Relative Time",docsExample:"4 years ago",options:null}],p=new Map(h.map(e=>[e.letter,e])),x=h.find(e=>e.isDefault)?.letter??"f",g=new Map,f=new Map,b=[["year",31536e3],["month",2592e3],["day",86400],["hour",3600],["minute",60],["second",1]];function y(e,t,a,s,n){if(!(Number.isFinite(e)&&864e10>=Math.abs(e)))return"out of range";let r=p.get(t);if(!r)return`unknown style "${t}"`;if(!r.options){let t=function(e){let t=f.get(e);if(t)return t;try{let t=new Intl.RelativeTimeFormat(e,{numeric:"always"});return f.set(e,t),t}catch{return null}}(s),{value:a,unit:r}=function(e){let t=Math.abs(e);for(let a=0;a<b.length;a++){let s=b[a];if(!s)continue;let[n,r]=s;if(t<r&&"second"!==n)continue;let l=Math.round(e/r),i=b[a-1];if(i&&Math.abs(l)*r>=i[1])return{value:Math.round(e/i[1]),unit:i[0]};return{value:l,unit:n}}return{value:0,unit:"second"}}(e-n);if(!t)return`${a} ${r}`;try{return t.format(a,r)}catch{return`${a} ${r}`}}let l=function(e,t,a){let s=p.get(a);if(!s||!s.options)return null;let n=`${e}|${t}|${a}`,r=g.get(n);if(r)return r;try{let a=new Intl.DateTimeFormat(e,{...s.options,timeZone:t});return g.set(n,a),a}catch{return null}}(s,a,t);if(!l)return"not available in this browser";try{return l.format(new Date(1e3*e))}catch{return"out of range"}}function j(e,t){return`<t:${e}:${t}>`}let v=new Map;function N(e){let t=v.get(e);if(t)return t;let a=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return v.set(e,a),a}function w(e){if(""===e.trim())return!1;try{return N(e).format(new Date(0)),!0}catch{return!1}}function k(e,t){let a={};for(let s of N(t).formatToParts(new Date(e)))"literal"!==s.type&&(a[s.type]=s.value);let s=a.hour??"0";return{year:Number(a.year),month:Number(a.month),day:Number(a.day),hour:"24"===s?0:Number(s),minute:Number(a.minute)}}function $(e,t){let a={};for(let s of N(t).formatToParts(new Date(e)))"literal"!==s.type&&(a[s.type]=s.value);let s=a.hour??"0";return Math.round((Date.UTC(Number(a.year),Number(a.month)-1,Number(a.day),"24"===s?0:Number(s),Number(a.minute),Number(a.second??"0"))-e)/6e4)}function A(e){if(0===e)return"UTC";let t=Math.abs(e),a=Math.floor(t/60),s=t%60;return`UTC${e<0?"-":"+"}${a}${s?`:${String(s).padStart(2,"0")}`:""}`}function S(e){if(""===e.trim())return!1;try{return Intl.getCanonicalLocales(e),new Intl.DateTimeFormat(e),!0}catch{return!1}}let C=/<t:(-?\d{1,17})(?::([A-Za-z]))?>/g;function D(e){return e.replace("-","").length>=12}function T(e){let t=[];C.lastIndex=0;let a=C.exec(e);for(;null!==a;){let s=a[1]??"",n=a[2]??null;t.push({start:a.index,end:a.index+a[0].length,raw:a[0],digits:s,epoch:Number(s),letter:n,letterKnown:null===n||p.has(n)}),a=C.exec(e)}return t}function z(e){return e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/\\u003c/gi,"<").replace(/\\u003e/gi,">").replace(/\\</g,"<").replace(/\\>/g,">")}function E(e,t,a,s){let n=T(e);if(0===n.length)return e;let r="",l=0;for(let i of n)r+=e.slice(l,i.start),r+=y(i.epoch,i.letter??x,t,a,s),l=i.end;return r+e.slice(l)}let M=["UTC","Pacific/Honolulu","America/Anchorage","America/Los_Angeles","America/Denver","America/Phoenix","America/Chicago","America/Ne
1w_York","America/Toronto","America/Mexico_City","America/Bogota","America/Sao_Paulo","America/Argentina/Buenos_Aires","Europe/Dublin","Europe/London","Europe/Lisbon","Europe/Madrid","Europe/Paris","Europe/Amsterdam","Europe/Berlin","Europe/Stockholm","Europe/Warsaw","Europe/Athens","Europe/Istanbul","Europe/Moscow","Africa/Lagos","Africa/Cairo","Africa/Nairobi","Africa/Johannesburg","Asia/Jerusalem","Asia/Dubai","Asia/Karachi","Asia/Kolkata","Asia/Kathmandu","Asia/Dhaka","Asia/Bangkok","Asia/Jakarta","Asia/Singapore","Asia/Manila","Asia/Hong_Kong","Asia/Shanghai","Asia/Seoul","Asia/Tokyo","Australia/Perth","Australia/Adelaide","Australia/Brisbane","Australia/Sydney","Pacific/Auckland"],F=["America/Los_Angeles","America/New_York","Europe/London","Europe/Berlin","Asia/Kolkata","Asia/Singapore","Asia/Tokyo","Australia/Sydney"],U=[{id:"en-US",label:"English (US)"},{id:"en-GB",label:"English (UK)"},{id:"de-DE",label:"German"},{id:"fr-FR",label:"French"},{id:"es-ES",label:"Spanish"},{id:"pt-BR",label:"Portuguese (Brazil)"},{id:"nl-NL",label:"Dutch"},{id:"pl-PL",label:"Polish"},{id:"sv-SE",label:"Swedish"},{id:"ja-JP",label:"Japanese"},{id:"ko-KR",label:"Korean"},{id:"zh-CN",label:"Chinese (Simplified)"}];function I(e){return e.replace(/_/g," ")}function P(e){return String(e).padStart(2,"0")}function R(e){return`${String(e.year).padStart(4,"0")}-${P(e.month)}-${P(e.day)}`}function L(e){return`${P(e.hour)}:${P(e.minute)}`}function B(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());if(!t)return null;let a=Number(t[1]),s=Number(t[2]),n=Number(t[3]),r=new Date(Date.UTC(a,s-1,n));return r.getUTCFullYear()!==a||r.getUTCMonth()!==s-1||r.getUTCDate()!==n?null:{year:a,month:s,day:n}}function J(e){let t=/^(\d{1,2}):(\d{2})(?::\d{2})?$/.exec(e.trim());if(!t)return null;let a=Number(t[1]),s=Number(t[2]);return a>23||s>59?null:{hour:a,minute:s}}var _=a(16110);function Y(e){return(0,c.CZ)([{key:"mode",value:e.mode},{key:"d",value:e.dateValue},{key:"tm",value:e.timeValue},{key:"tz",value:e.eventZone},{key:"z",value:e.zones.length>0?e.zones.join(","):null},{key:"loc",value:e.locale},{key:"st",value:e.style},{key:"ci",value:(e.candidateIndex??0)>0?String(e.candidateIndex):null},{key:"msg",value:"read"===e.mode&&""!==e.decodeInput.trim()?e.decodeInput.slice(0,400):null,personal:"the message you pasted"}])}let K="toolbreezy.discord-timestamp.v1";function G(){var e,t;let[a,g]=(0,n.useState)("build"),[f,b]=(0,n.useState)(""),[v,N]=(0,n.useState)(""),[C,P]=(0,n.useState)(""),[G,O]=(0,n.useState)("en-US"),[Z,V]=(0,n.useState)(x),[W,H]=(0,n.useState)([]),[q,Q]=(0,n.useState)(""),[X,ee]=(0,n.use
1State)(""),[et,ea]=(0,n.useState)(""),[es,en]=(0,n.useState)(0),[er,el]=(0,n.useState)(""),ei=(0,n.useRef)(null),[eo,ed]=(0,n.useState)(""),[ec,eu]=(0,n.useState)(0),[em,eh]=(0,n.useState)(!1),[ep,ex]=(0,n.useState)(""),[eg,ef]=(0,n.useState)(M);(0,n.useEffect)(()=>{let e=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}();ex(e);let t=(0,c.qA)(window.location.search,window.location.hash),a=[],s=null;try{let e=window.localStorage.getItem(K);e&&(s=JSON.parse(e))}catch{s=null}let n=t.get("tz"),r=e;null!==n&&(w(n)?r=n:a.push(`the link named a timezone this browser does not know (${n})`)),P(r);let l=t.get("loc"),i="string"==typeof s?.locale?s.locale:null;null!==l&&S(l)?O(l):null!==l?a.push(`the link named a language tag that is not valid (${l})`):i&&S(i)?O(i):O(function(){try{return navigator.language||"en-US"}catch{return"en-US"}}());let o=t.get("st"),d="string"==typeof s?.style?s.style:null;null!==o&&p.has(o)?V(o):null!==o?a.push(`the link named a style letter Discord does not have (${o})`):d&&p.has(d)&&V(d);let u=t.get("z"),m=Array.isArray(s?.zones)?s.zones.filter(e=>"string"==typeof e):null,h=function(e,t,a,s){let n=[],r=[],l=[];for(let t of e){let e=t.trim();if(!(""===e||n.includes(e))){if(!a(e)){s&&l.push(`skipped an unknown timezone from the link (${e})`);continue}if(n.length>=12){r.push(e);continue}n.push(e)}}return n.includes(t)||(n.length<12?n.unshift(t):r.push(t)),r.length>0&&l.push(`the link named more than the 12 timezones this list holds, so ${1===r.length?"this was":"these were"} left off: ${r.join(", ")}`),{zones:n.length>0?n:[t],problems:l}}(null!==u?u.split(","):m??[r,...F.slice(0,4)],r,w,null!==u);a.push(...h.problems),H(h.zones);let x=Date.now();eu(x);let f=t.get("d"),y=t.get("tm"),j=null!==f?B(f):null,v=null!==y?J(y):null;if(null!==f&&null===j&&a.push(`the date in the link could not be read (${f})`),null!==y&&null===v&&a.push(`the time in the link could not be read (${y})`),j&&v)b(R({...j,...v})),N(L({...j,...v}));else{let e=k(x+(36e5-x%36e5),r);b(R(e)),N(L(e))}let $=Number.parseInt(t.get("ci")??"",10);Number.isFinite($)&&$>0&&$<4&&(ei.current=$),"read"===t.get("mode")&&g("read");let A=t.get("msg");null!==A&&ea(A),a.length>0&&ed(`Part of that link could not be used, so this fell back to the defaults: ${a.join(", ")}.`);let C=Intl.supportedValuesOf;if("function"==typeof C)try{let e=C("timeZone");Array.isArray(e)&&e.length>0&&ef(e)}catch{}eh(!0)},[]),(0,n.useEffect)(()=>{let e=window.setInterval(()=>eu(Date.now()),1e3);return()=>window.clearInterval(e)},[]),(0,u.Vd)(K,()=>0===W.length||""===C?null:JSON.stringify({zones:W,locale:G,style:Z}),[W,G,Z,C]);let eb=(0,n.useMemo)(()=>B(f),[f]),ey=(0,n.useMemo)(()=>J(v),[v]),ej=(0,n.useMemo)(()=>eb&&ey&&""!==C&&w(C)?function(e,t){let a=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,0),s=[];for(let n of[a-864e5,a,a+864e5]){let r=a-6e4*$(n,t);!s.includes(r)&&function(e,t,a){let s=k(e,t);return s.year===a.year&&s.month===a.month&&s.day===a.day&&s.hour===a.hour&&s.minute===a.minute}(r,t,e)&&s.push(r)}if(s.sort((e,t)=>e-t),1===s.length){let e=s[0];if(void 0!==e)return{kind:"ok",candidates:[{ms:e,hint:""}]}}if(s.length>1)return{kind:"ambiguous",candidates:s.map((e,t)=>({ms:e,hint:0===t?"the first time the clock reads this":"the second time, after the clocks go back"}))};let n=$(a-864e5,t),r=$(a+864e5,t),l=a-6e4*Math.min(n,r),i=[{ms:l,hint:"your reading carried past the skip"}],o=function(e,t,a){let s=$(e,a);if(s===$(t,a))return null;let n=e,r=t;for(;r-n>6e4;){let e=n+6e4*Math.floor((r-n)/2/6e4);if(e<=n||e>=r)break;$(e,a)===s?n=e:r=e}return r}(a-864e5,a+864e5,t);return null!==o&&o!==l&&i.push({ms:o,hint:"the first minute after the clocks jump"}),{kind:"gap",candidates:i}}({...eb,...ey},C):null,[eb,ey,C]),ev=ej?ej.candidates.map(e=>e.ms).join(","):"";(0,n.useEffect)(()=>{ev!==er&&(el(ev),""!==ev&&null!==ei.current?(en(ei.current),ei.current=null):en(0))},[ev,er]);let eN=ej?ej.candidates[Math.min(es,ej.candidates.length-1)]??null:null,ew=eN?Math.floor(eN.ms/1e3):null,ek=Math.floor(ec/1e3),e$=(0,n.useMemo)(()=>null===ew?[]:W.map(e=>({zone:e,offset:$(1e3*ew,e),cells:h.map(t=>({letter:t.letter,name:t.name,text:y(ew,t.letter,e,G,ek)}))})),[ew,W,G,ek]),eA=(0,n.useMemo)(()=>
1{if(null===ew)return"";let e=h.map(e=>`${e.letter}  ${e.name.padEnd(24)} ${j(ew,e.letter)}`);return e.push(`-  no style, Discord uses ${x}   <t:${ew}>`),e.join("\n")},[ew]),eS=(0,n.useMemo)(()=>null===ew?[]:[{label:"Event start",text:`Starts ${j(ew,"F")} (${j(ew,"R")})`},{label:"Countdown to a deadline",text:`Deadline is ${j(ew,"f")}, which is ${j(ew,"R")}.`},{label:"Going live",text:`Going live ${j(ew,"t")}, ${j(ew,"R")}.`}],[ew]),eC=(0,n.useMemo)(()=>{let e=et.trim();if(""===e)return null;let t=T(z(et));if(t.length>0)return{kind:"tags",tags:t.slice(0,25),total:t.length};let a=/^-?\d{1,17}$/.exec(z(e).replace(/`/g,""));if(a){let e=a[0];return{kind:"bare",digits:e,value:Number(e)}}return{kind:"none",sample:e.slice(0,60)}},[et]),eD=ep||W[0]||C,eT=(0,n.useMemo)(()=>eN?function(e,t,a){if(!Number.isFinite(e)||!Number.isFinite(t)||0===t)return[];let s=new Set,n=[];for(let r of a){if(""===r||s.has(r)||!w(r))continue;s.add(r);let a=$(e,r),l=$(t,r);a!==l&&n.push({zone:r,then:a,current:l})}return n}(eN.ms,ec,[C,eD,...W]):[],[eN,ec,C,eD,W]);function ez(e){if(""===C)return;let t=k(e,C);b(R(t)),N(L(t))}function eE(e){let t={added:0,duplicates:[],invalid:[],overCap:[]},a=[...W];for(let s of e){let e=s.trim();if(""!==e){if(a.includes(e)){t.duplicates.push(e);continue}if(!w(e)){t.invalid.push(e);continue}if(a.length>=12){t.overCap.push(e);continue}a.push(e),t.added++}}return t.added>0&&H(a),t}function eM(e){let t=[];return t.push(1===e.added?"Added 1 timezone.":`Added ${e.added} timezones.`),e.duplicates.length>0&&t.push(`Already on the list: ${e.duplicates.join(", ")}
1.`),e.invalid.length>0&&t.push(`Not a timezone this browser recognizes: ${e.invalid.join(", ")}. Use an IANA name like Europe/Berlin.`),e.overCap.length>0&&t.push(`Left off because the list holds 12: ${e.overCap.join(", ")}.`),t.join(" ")}function eF(){let e=q.split(/[,\n]/).map(e=>e.trim()).filter(e=>""!==e);if(0===e.length)return void ee("Type a timezone name first, like Asia/Tokyo. You can paste several separated by commas.");let t=eE(e);ee(eM(t)),t.added>0&&Q("")}let eU=(0,n.useMemo)(()=>""===C||w(C),[C]),eI=(0,n.useMemo)(()=>S(G),[G]),eP=""!==f.trim()&&null===eb,eR=""!==v.trim()&&null===ey,eL=null!==ew?j(ew,Z):"",eB=p.get(Z);return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(l.$,{variant:"build"===a?"default":"outline",size:"sm",onClick:()=>g("build"),children:"Build a timestamp"}),(0,s.jsx)(l.$,{variant:"read"===a?"default":"outline",size:"sm",onClick:()=>g("read"),children:"Read one you were sent"})]}),""!==eo&&(0,s.jsx)("p",{className:"rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-xs text-foreground",children:eo}),"build"===a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(i.J,{htmlFor:"dts-date",children:"Date of the event"}),(0,s.jsx)(r.p,{id:"dts-date",type:"date",value:f,onChange:e=>b(e.target.value),className:(0,m.cn)(eP&&"border-destructive focus-visible:ring-destructive"),"aria-invalid":eP}),eP&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:"That date could not be read. Use the format 2027-03-14."})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(i.J,{htmlFor:"dts-time",children:"Time (24 hour)"}),(0,s.jsx)(r.p,{id:"dts-time",type:"time",value:v,onChange:e=>N(e.target.value),className:(0,m.cn)(eR&&"border-destructive focus-visible:ring-destructive"),"aria-invalid":eR}),eR&&(0,s.jsx)("p",{className:"text-xs text-destructive",children:"That time could not be read. Use the format 20:30."})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(i.J,{htmlFor:"dts-zone",children:"The timezone that time is in"}),(0,s.jsx)(r.p,{id:"dts-zone",list:"dts-zone-list",value:C,spellCheck:!1,autoComplete:"off",onChange:e=>P(e.target.value),placeholder:"Europe/Berlin",className:(0,m.cn)(!eU&&"border-destructive focus-visible:ring-destructive"),"aria-invalid":!eU}),(0,s.jsx)("datalist",{id:"dts-zone-list",children:eg.map(e=>(0,s.jsx)("option",{value:e},e))}),eU?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[(e=C,t=ec,""!==e&&0!==t&&w(e)?`${I(e)} is on ${A($(t,e))} right now`:"Reading your clock"),". Your own device says you are in"," ",""===ep?"a zone it has not reported yet":I(ep),", so if that looks wrong the clock settings on this machine are the place to fix it."]}):(0,s.jsxs)("p",{className:"text-xs text-destructive",children:["This browser does not recognize ",C,". Pick an IANA name like America/Chicago."]})]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:[["now","Now"],["plus1","In 1 hour"],["plus3","In 3 hours"],["tonight","Tonight 8pm"],["friday","Next Friday 8pm"]].map(([e,t])=>(0,s.jsx)(l.$,{variant:"outline",size:"sm",onClick:()=>(function(e){if(""===C||0===ec)return;if("now"===e)return void ez(ec-ec%6e4);if("plus1"===e)return void ez(ec+36e5);if("plus3"===e)return void ez(ec+108e5);let t=k(ec,C);if("tonight"===e){b(R(t)),N("20:00");return}let a=(5-new Date(Date.UTC(t.year,t.month-1,t.day)).getUTCDay()+7)%7||7;b(R({...function(e,t){let a=new Date(Date.UTC(e.year,e.month-1,e.day+t));return{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate()}}(t,a),hour:20,minute:0}
1)),N("20:00")})(e),children:t},e))}),ej&&"ok"!==ej.kind&&(0,s.jsxs)("fieldset",{className:"space-y-2 rounded-md border border-amber-500/40 bg-amber-500/10 p-3",children:[(0,s.jsx)("legend",{className:"px-1 text-sm font-medium",children:"ambiguous"===ej.kind?"The clocks go back that night, so this reading happens twice":"The clocks jump forward that night, so this reading never happens"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"ambiguous"===ej.kind?`${v} comes around twice in ${I(C)} on that date. Pick the one you mean, because they are an hour apart.`:`${v} is inside the hour ${I(C)} skips on that date. Pick what you would rather post.`}),ej.candidates.map((e,t)=>{let a=k(e.ms,C);return(0,s.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,s.jsx)("input",{type:"radio",name:"dts-dst",className:"mt-1",checked:t===Math.min(es,ej.candidates.length-1),onChange:()=>en(t)}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-mono",children:L(a)})," ",A($(e.ms,C)),", ",e.hint]})]},e.ms)})]}),eT.length>0&&(0,s.jsxs)("p",{className:"rounded-md border bg-muted/40 p-3 text-xs text-foreground",children:["Heads up."," ",1===eT.length?`${I(eT[0].zone)} changes its clocks between now and then.`:`${eT.length} of the timezones on this page change their clocks between now and then.`," ",eT.map(e=>`${I(e.zone)} is on ${A(e.current)} today and ${A(e.then)} on the day of the event.`).join(" ")," ","The tag below is right, but if you worked the time out in your head using today's clock, check it again."]}),(0,s.jsx)("div",{className:"space-y-3 rounded-md border bg-muted px-4 py-3",children:null===ew?(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Set a date, a time and a timezone above and the tag appears here."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:h.map(e=>(0,s.jsx)(l.$,{variant:e.letter===Z?"default":"outline",size:"sm",onClick:()=>V(e.letter),title:e.name,children:e.letter},e.letter))}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("span",{className:"text-sm text-muted-foreground",children:["Paste this into Discord (",eB?.name??Z,")"]}),(0,s.jsx)("p",{className:"break-all font-mono text-lg font-medium text-foreground",children:eL})]}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded border bg-background p-2",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"While you are typing it"}),(0,s.jsx)("p",{className:"break-all font-mono text-sm",children:eL})]}),(0,s.jsxs)("div",{className:"rounded border bg-background p-2",children:[(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["After you send, for a reader in ",I(eD)]}),(0,s.jsx)("p",{className:"text-sm",children:y(ew,Z,eD,G,ek)})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(_.i,{value:eL,label:`Copy the ${Z} tag`,copiedLabel:"Copied!",variant:"outline",size:"sm"}),(0,s.jsx)(_.i,{value:eA,label:"Copy all nine styles",copiedLabel:"Copied!",variant:"outline",size:"sm"}),(0,s.jsx)(_.i,{value:String(ew),label:"Copy the raw epoch",copiedLabel:"Copied!",variant:"outline",size:"sm"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Copy always puts the raw tag on your clipboard, never the rendered words. Copying what you see would defeat the whole point, since the text has to stay a tag for Discord to convert it per reader."})]})}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"What your members will actually see"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Same moment, every timezone on your list, all nine styles. This is the check worth doing before you post, because 8pm on a Friday 
1is already Saturday morning for part of most servers."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-end gap-2",children:[(0,s.jsxs)("div",{className:"min-w-[14rem] flex-1 space-y-1.5",children:[(0,s.jsxs)(i.J,{htmlFor:"dts-add-zone",children:["Add a timezone (",W.length," of ",12," used)"]}),(0,s.jsx)(r.p,{id:"dts-add-zone",list:"dts-zone-list",value:q,spellCheck:!1,autoComplete:"off",onChange:e=>Q(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),eF())},placeholder:"Asia/Tokyo, or paste a comma separated list"})]}),(0,s.jsx)(l.$,{variant:"outline",size:"sm",onClick:eF,children:"Add"}),(0,s.jsx)(l.$,{variant:"outline",size:"sm",onClick:()=>ee(eM(eE([...F]))),children:"Add a common spread"})]}),""!==X&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground","aria-live":"polite",children:X}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5",children:[W.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border bg-background px-2 py-1 text-xs",children:[I(e),(0,s.jsx)("button",{type:"button",onClick:()=>H(t=>t.filter(t=>t!==e)),className:"text-muted-foreground hover:text-destructive","aria-label":`Remove ${I(e)}`,children:"x"})]},e)),0===W.length&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:em?"No timezones on the list. Add one above to see the preview.":"Your own timezone and a common spread go on this list as the page loads."})]}),0===e$.length?(0,s.jsx)("p",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:em?"The preview fills in once you have a valid moment and at least one timezone.":"The preview is built from your browser clock and your own timezone, so it fills in as the page loads."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"hidden overflow-x-auto sm:block",children:(0,s.jsxs)("table",{className:"w-full min-w-[58rem] border-collapse text-left text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b",children:[(0,s.jsx)("th",{className:"p-2 font-medium",children:"Reader in"}),h.map(e=>(0,s.jsx)("th",{className:"p-2 font-mono font-medium",title:e.name,children:e.letter},e.letter))]})}),(0,s.jsx)("tbody",{children:e$.map(e=>(0,s.jsxs)("tr",{className:"border-b last:border-0",children:[(0,s.jsxs)("th",{scope:"row",className:"whitespace-nowrap p-2 text-left font-normal",children:[I(e.zone),(0,s.jsx)("span",{className:"block text-muted-foreground",children:A(e.offset)})]}),e.cells.map(e=>(0,s.jsx)("td",{className:"p-2 align-top",children:e.text},e.letter))]},e.zone))})]})}),(0,s.jsx)("div",{className:"space-y-3 sm:hidden",children:e$.map(e=>(0,s.jsxs)("div",{className:"rounded-md border p-3",children:[(0,s.jsxs)("p",{className:"text-sm font-medium",children:[I(e.zone)," ",(0,s.jsx)("span",{className:"font-normal text-muted-foreground",children:A(e.offset)})]}),(0,s.jsx)("dl",{className:"mt-2 space-y-1 text-xs",children:e.cells.map(e=>(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("dt",{className:"w-4 shrink-0 font-mono text-muted-foreground",children:e.letter}),(0,s.jsx)("dd",{children:e.text})]},e.letter))})]},e.zone))}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"The R column reads the same in every row on purpose. Relative time counts from the reader's own clock, so it does not change with their timezone. Everything else does."})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(i.J,{htmlFor:"dts-locale",children:"Preview in this language"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(r.p,{id:"dts-locale",list:"dts-locale-list",value:G,spellCheck:!1,autoComplete:"off",onChange:e=>O(e.target.value),className:(0,m.cn)("max-w-[16rem]",!eI&&"border-destructive focus-visible:ring-destructive"),"aria-invalid":!eI}),(0,s.jsx)("datalist",{id:"dts-locale-list",children:U.map(e=>(0,s.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:eI?"This is what a reader whose app runs in that language would see. You cannot set it for them, it comes from their own device.":`${G} is not a language tag this browser knows. Try en-GB or de-DE.`})]})]}),eS.length>0&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"Ready to paste"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"The phrasing experienced organizers use, with the tags already in place."}),eS.map(e=>(0,s.jsxs)("div",{className:"space-y-1 rounded-md border p-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-xs font-medium",children:e.label}),(0,s.jsx)(_.i,{value:e.text,label:"Copy",copiedLabel:"Copied!",variant:"ghost",size:"sm"})]}),(0,s.jsx)("p",{className:"break-all font-mono text-xs",children:e.text}),(0,s.jsx)("p",{className:"text-sm",children:E(e.text,eD,G,ek)})]},e.label))]})]}):(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(i.J,{htmlFor:"dts-decode",children:"Paste a tag, a bare number, or the whole message"}),(0,s.jsx)(o.T,{id:"dts-decode",value:et,onChange:e=>ea(e.target.value),spellCheck:!1,placeholder:"Raid starts <t:1795000000:F>, that is <t:1795000000:R>",className:"font-mono text-sm"}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Backticks, escaped angle brackets and JSON escaping are all handled, so text straight out of a log or a bot payload works.",et.length>400?` Decoding reads all ${et.length} characters, but a Share link only carries the first 400.`:""]})]}),null===eC&&(0,s.jsx)("p",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:"Nothing pasted yet. Drop in anything that contains a Discord timestamp and it gets read back as a date."}),eC?.kind==="none"&&(0,s.jsxs)("p",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm",children:["No timestamp tag in there. What came through starts with “",eC.sample,"”. A tag looks like ",(0,s.jsx)("span",{className:"font-mono",children:"<t:1795000000:F>"}),", with a number of seconds and an optional style letter."]}),eC?.kind==="bare"&&(0,s.jsxs)("div",{className:"space-y-2 rounded-md border bg-muted/40 p-3 text-sm",children:[(0,s.jsx)("p",{children:"That is a bare number with no tag around it, so it could be read two ways. Both readings are below, rather than a guess about which one you meant."}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"font-medium",children:"As seconds:"})," ",y(eC.value,"F",eD,G,ek)]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"font-medium",children:"As milliseconds:"})," ",y(Math.trunc(eC.value/1e3),"F",eD,G,ek)]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Discord wants seconds. ",D(eC.digits)?`Yours is ${eC.digits.replace("-","").length} digits long, which is the milliseconds shape.`:"Yours is the right length for seconds."]}),(0,s.jsx)(_.i,{value:j(D(eC.digits)?Math.trunc(eC.value/1e3):eC.value,x),label:"Copy it as a tag",copiedLabel:"Copied!",variant:"outline",size:"sm"})]}),eC?.kind==="tags"&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:[1===eC.total?"Found 1 tag.":`Found ${eC.total} tags.`,eC.total>25?" Showing the first 25.":""]}),eC.tags.map((e,t)=>{let a=e.letter??x,n=e.letterKnown,r=D(e.digits);return(0,s.jsxs)("div",{className:"space-y-1 rounded-md border p-3 text-sm",children:[(0,s.jsx)("p",{className:"break-all font-mono text-xs text-muted-foreground",children:e.raw}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"font-medium",children:"Style:"})," ",null===e.letter?`omitted, so Discord uses ${x} (${p.get(x)?.name??""})`:n?`${e.letter} (${p.get(e.letter)?.name??""})`:`${e.letter}, which is not one of Discord's nine. Showing it as ${x} instead.`]}),(0,s.jsxs)("p",{children:[(0,s.jsxs)("span",{className:"font-medium",children:["In ",I(eD),":"]})," ",y(e.epoch,n?a:x,eD,G,ek)]}
1),r&&(0,s.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:[e.digits.replace("-","").length," digits, which is the milliseconds shape. Discord wants seconds, so read literally this lands on"," ",y(e.epoch,"D",eD,G,ek),". Divided by 1000 it is"," ",y(Math.trunc(e.epoch/1e3),"F",eD,G,ek),"."]}),W.length>1&&(0,s.jsxs)("details",{className:"text-xs",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"Show it in the other timezones on your list"}),(0,s.jsx)("ul",{className:"mt-1 space-y-0.5",children:W.map(t=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("span",{className:"text-muted-foreground",children:[I(t),":"]})," ",y(e.epoch,n?a:x,t,G,ek)]},t))})]})]},`${e.start}-${t}`)}),(0,s.jsxs)("div",{className:"space-y-1 rounded-md border bg-muted/40 p-3",children:[(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["The whole message, as a reader in ",I(eD)," sees it"]}),(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:E(z(et),eD,G,ek)})]})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-base font-semibold",children:"Every style Discord has"}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[34rem] border-collapse text-left text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b",children:[(0,s.jsx)("th",{className:"p-2 font-medium",children:"Style"}),(0,s.jsx)("th",{className:"p-2 font-medium",children:"Name"}),(0,s.jsx)("th",{className:"p-2 font-medium",children:"Discord's example"}),(0,s.jsx)("th",{className:"p-2 font-medium",children:""===eD?"Yours":`Yours (${I(eD)})`})]})}),(0,s.jsx)("tbody",{children:h.map(e=>(0,s.jsxs)("tr",{className:"border-b last:border-0",children:[(0,s.jsxs)("td",{className:"p-2 font-mono",children:[e.letter,e.isDefault?" *":""]}),(0,s.jsx)("td",{className:"p-2",children:e.name}),(0,s.jsx)("td",{className:"p-2 text-muted-foreground",children:e.docsExample}),(0,s.jsx)("td",{className:"p-2",children:null===ew?"":y(ew,e.letter,eD,G,ek)})]},e.letter))})]})}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["* is the style Discord falls back to when the tag has no letter. Taken from the"," ",(0,s.jsx)("a",{href:"https://docs.discord.com/developers/reference",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Discord developer reference"}),", checked ","2026-08-13",". If Discord changes the table, this page is out of date until we check again, which is why the date is printed rather than left to your imagination."]})]}),(0,s.jsx)(d.ToolActions,{share:()=>Y({mode:a,dateValue:f,timeValue:v,eventZone:C,zones:W,locale:G,style:Z,decodeInput:et,candidateIndex:es}),title:"Discord Timestamp Generator",embedCarriesPersonal:!1})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.