PYYUPSK

a self-taught dev from Thailand

Pongsakorn Thipayanate · Samutsakhon, TH ·webring

active

fdu

An ultra-fast, zero-dependency date-time library for JavaScript. It runs about 4 times faster than Day.js.

TypeScript / npm / Zero-Dependency· 2025

GitHub →Website →

view .mdopen in claudeopen in chatgpt

An ultra-fast, zero-dependency date-time library for JavaScript and TypeScript. It has an immutable API, a tree-shakeable ESM design, and locale-aware formatting. Its arithmetic follows calendar-correct floor semantics, meaning it rounds date math down to whole units instead of up.

Performance

fdu was benchmarked against Day.js, date-fns, and Luxon. The results:

  • fdu runs 4 times faster at date manipulation.
  • fdu runs 13 times faster at comparisons.
  • fdu runs 1.7 times faster at formatting.

Usage

import { fdu } from "@pyyupsk/fdu";

const date = fdu("2025-09-30");

date.format("YYYY-MM-DD HH:mm:ss");
date.add(1, "day").format("[Tomorrow is] dddd");

← All projects