npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mfuon2/chrono-utilz

v2.0.2

Published

A comprehensive date utility library built on Three Pillars Architecture: Core Operations (45+ functions), Business Utilities (55+ functions), and Formatting & Parsing (35+ functions). Features natural language parsing, timezone conversion, fiscal periods

Readme

A comprehensive date utility library with 135+ functions for serious date manipulation in JavaScript and TypeScript applications.

npm version Bundle Size Downloads License

📖 Complete Documentation & Examples

🚀 Main Features

Core Date Operations

import { parseNaturalLanguage, convertTimezone, generateRecurringDates, getRelativeTime } from '@mfuon2/chrono-utilz';

// Natural language parsing (assuming today is Jan 12, 2025)
parseNaturalLanguage('next Friday');     // → 2025-01-17
parseNaturalLanguage('in 2 weeks');      // → 2025-01-26  
parseNaturalLanguage('3 days ago');      // → 2025-01-09
parseNaturalLanguage('tomorrow');        // → 2025-01-13
parseNaturalLanguage('last Monday');     // → 2025-01-06

// Timezone conversion
convertTimezone(new Date('2025-01-12T15:00:00Z'), {
  from: 'UTC', 
  to: 'America/New_York'
});                                       // → 2025-01-12T10:00:00 (EST)

// Recurring dates
generateRecurringDates(new Date('2025-01-12'), {
  pattern: 'weekly',
  maxOccurrences: 3
});                                       // → [2025-01-12, 2025-01-19, 2025-01-26]

// Relative time 
getRelativeTime('2025-01-12T15:35:00Z');  // → "2 minutes ago"
getRelativeTime('2025-01-12T16:30:00Z');  // → "in 1 hour"
getRelativeTime('2025-01-10T15:30:00Z');  // → "2 days ago" 
getRelativeTime('2025-01-15T15:30:00Z');  // → "in 3 days"

Business Logic

import { getBusinessDays, getFiscalQuarter, generatePayrollPeriods } from '@mfuon2/chrono-utilz';

// Working days calculation
getBusinessDays(startDate, endDate);     // → Number of business days

// Fiscal periods
getFiscalQuarter(new Date());             // → Current fiscal quarter info

// Payroll periods
generatePayrollPeriods(2025, 'biweekly'); // → All payroll periods for 2025

Advanced Formatting

import { formatDate, formatDuration, formatLocalized } from '@mfuon2/chrono-utilz';

// Multiple date formats
formatDate(new Date(), 'YYYY-MM-DD');    // → "2025-01-15"
formatDate(new Date(), 'MMM DD, YYYY');  // → "Jan 15, 2025"

// Duration formatting
formatDuration(3661000, 'verbose');      // → "1 hour 1 minute 1 second"

// Localized formatting  
formatLocalized(new Date(), 'en-US');    // → US format
formatLocalized(new Date(), 'de-DE');    // → German format

Installation

# Using npm
npm install @mfuon2/chrono-utilz

# Using yarn
yarn add @mfuon2/chrono-utilz

# Using pnpm
pnpm add @mfuon2/chrono-utilz

Key Functions by Category

📅 Core Operations (45+ functions) parseDate, addTime, subtractTime, getDateDiff, isBetweenDates, startOf, endOf, convertTimezone, parseNaturalLanguage, generateRecurringDates

💼 Business Logic (55+ functions)
getBusinessDays, getFiscalQuarter, generatePayrollPeriods, calculateWorkingHours, generateShiftSchedule, calculateSLACompliance, getHolidays

🎨 Formatting & Parsing (35+ functions) formatDate, formatDuration, parseISO, smartParse, formatLocalized, humanizeDuration

For complete function list and examples, visit our documentation site

Environment Support

  • Node.js: 14.0.0+
  • Browsers: Modern browsers with ES2015 support
  • TypeScript: Full type safety included
  • Zero dependencies - Lightweight and fast

Contributing

We welcome contributions! See our Contributing Guide for details.

What's Next

See our roadmap and upcoming features on the documentation site.

License

MIT