ts-time-utils
A comprehensive TypeScript utility library for time, dates, durations, and calendar operations
npm install ts-time-utils
Lightweight
Zero dependencies, pure TypeScript
Tree-shakable
Import only what you need
320+ Functions
26 utility categories
TypeScript
Full type safety & IntelliSense
Try it Live
Explore Categories
Format
Format durations, time ago strings, and custom date formats
Calculate
Date arithmetic, differences, and business day calculations
Validate
Validate dates, check conditions, and compare dates
Duration
Immutable Duration class with arithmetic operations
Timezone
Timezone conversions, DST handling, and zone comparisons
Calendar
ISO weeks, quarters, holidays, and calendar grids
DateRange
Date range operations: overlap, gaps, merge, split
Recurrence
RRULE-inspired recurring event patterns
Cron
Parse and match cron expressions
Fiscal
Fiscal year utilities with configurable start month
Compare
Sort, group, and analyze date arrays
Iterate
Iterate through date sequences and count dates
Parse
Parse dates from various formats and strings
NaturalLanguage
Parse human-friendly date strings
Chain
Fluent chainable API for date operations