Skip to content

Introduction

A zero-dependency, TypeScript-native date utility library with smart formatting, business day logic, intelligent parsing, and full i18n — all in under 2 KB gzipped.

import { wiz, format, getRelativeTime } from 'date-wiz';
// Chainable
const deadline = wiz(new Date()).add(3, 'businessDays').setHour(17).format('LLL');
// Standalone (tree-shakable)
const ago = getRelativeTime(oldDate, { locale: 'bn-BD', precision: 2 });
// → "২ দিন, ৪ ঘন্টা আগে"

Most date libraries make you choose between size and features. date-wiz doesn’t.

Moment.jsDay.jsdate-wiz
Zero runtime deps
Bundle size (gzip)~70 KB~7 KB< 2 KB
TypeScript nativePartial
Tree-shakable ESM
Business day logicPluginPlugin✅ Built-in
Smart formatting✅ Built-in
Intelligent parsing✅ Built-in
i18n via IntlPlugin✅ Built-in
Immutable

Zero dependencies

Built purely on native Date and Intl objects. Nothing from npm ships to your users.

TypeScript native

Full type safety, auto-complete for every option, and declaration maps. No @types/ package needed.

Tree-shakable

Import only what you use. date-wiz/format is ~1.2 KB. Bundlers drop the rest automatically.

Smart formatting

Context-aware labels: “Today at 4:30 PM”, “Yesterday at 11 AM”, “Oct 12, 2022”. No config needed.

Business day logic

Add/subtract business days, count working days between dates, SLA hour checks — all built-in.

Intelligent parsing

Understands 20240515, 15-05-2024, +2d, -1w, next_monday — no format strings needed.