Serein
Rust로 만든 가볍고 성능 좋은 Discord 전용 네이티브 클라이언트
날짜와 시간을 선택해 포맷을 정하고 코드를 복사하면 Discord가 자동으로 현지 시간으로 변환해줍니다
Pick a date and time, choose a format, and copy the <t:UNIX:FORMAT> code. Discord converts it to every reader’s own time zone automatically. Free, no sign-up.
소셜TypeScriptGitHub @fazal-bhinder온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기Discord <t:unix:F> timestamp codes, DST-safe time zone to Unix conversion, and snowflake ID decoding. Zero dependencies, TypeScript.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Make Discord timestamp codes like <t:1798765200:F>, which every reader sees in their own time zone. The kit also converts a date and time in any IANA time zone to Unix seconds without DST bugs, accepts Unix input in seconds or milliseconds, and decodes Discord snowflake IDs into the moment they were created. It is pure TypeScript with zero dependencies and no DOM, so it runs in browsers, Workers, Deno, Bun and Node 22+.
Powers https://discordtimestampgen.com. If you'd rather not bundle a library, the same engine is also a free JSON API: https://discordtimestampgen.com/developers
npm install discord-timestamp-kit
<t:unix:F> codeimport { buildTimestampCode, DISCORD_FORMATS } from 'discord-timestamp-kit';
buildTimestampCode(1798765200, 'F'); // '<t:1798765200:F>'
for (const f of DISCORD_FORMATS) {
console.log(f.code, f.label, buildTimestampCode(1798765200, f.code));
}
// t Short Time <t:1798765200:t>
// T Long Time <t:1798765200:T>
// d Short Date <t:1798765200:d>
// D Long Date <t:1798765200:D>
// f Short Date/Time <t:1798765200:f>
// F Long Date/Time <t:1798765200:F>
// R Relative Time <t:1798765200:R>
import { dateTimeToUnixInTz, buildTimestampCode } from 'discord-timestamp-kit';
// 8 PM on New Year's Eve in New York
const unix = dateTimeToUnixInTz('2026-12-31', '20:00', 'America/New_York'); // 1798765200
buildTimestampCode(unix!, 'R'); // '<t:1798765200:R>'
The inputs use the same YYYY-MM-DD and HH:mm strings that <input type="date"> and <input type="time"> produce. The time-zone offset is sampled twice, the second time at the instant being returned, so times in the hours around a DST change don't come out an hour off. Pass 'UTC' for UTC. Leave the zone out to use the runtime's own zone. The function returns null for blank or malformed input. An unknown zone name falls back to the runtime's zone.
import { parseUnixInput } from 'discord-timestamp-kit';
parseUnixInput('1798765200'); // { unix: 1798765200, wasMs: false }
parseUnixInput('1798765200000'); // { unix: 1798765200, wasMs: true }
parseUnixInput('12.5'); // null (integers only)
Any value of 100,000,000,000 or more is treated as milliseconds. In seconds, that would be a date in the year 5138.
import { decodeSnowflake } from 'discord-timestamp-kit';
const s = decodeSnowflake('175928847299117063');
// { unixMs: 1462015105796, unixSeconds: 1462015105, workerId: 1, processId: 0, increment: 7 }
new Date(s!.unixMs).toISOString(); // '2016-04-30T11:18:25.796Z'
Message, user, channel and server IDs are all snowflakes. The bit math uses BigInt, so IDs above Number.MAX_SAFE_INTEGER decode exactly. Pass the ID as a string.
import { renderDiscordPreview } from 'discord-timestamp-kit';
renderDiscordPreview(1798765200, 'F'); // e.g. 'Thursday, December 31, 2026 8:00 PM'
renderDiscordPreview(1798765200, 'R', 1798758000); // 'in 2 hours'
The preview uses Discord's en-US layout, in the runtime's local time zone. The R format takes an optional "now", in Unix seconds.
| Export | What it does |
|---|---|
DISCORD_FORMATS | The 7 format codes (t T d D f F R) with label, description and example |
buildTimestampCode(unix, code) | Returns <t:unix:code> |
dateTimeToUnixInTz(date, time, timeZone?) | Converts a wall-clock date and time in an IANA zone to Unix seconds, DST-safe |
parseUnixInput(raw) | Parses an integer string in seconds or milliseconds, or returns null |
decodeSnowflake(raw) | Returns { unixMs, unixSeconds, workerId, processId, increment }, or null |
renderDiscordPreview(unix, code, now?) | Returns the text Discord's English client would show |
Types: DiscordFormat, DiscordFormatCode, DecodedSnowflake.
npm test # 23 engine checks: DST boundaries in New York, London and Sydney, half-hour offsets, ms detection, Discord's documented snowflake example
MIT