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

aniccajs

v1.0.0

Published

A lightweight, immutable JavaScript date library for formatting, manipulation, and business logic.

Readme

AniccaJS ⏳

AniccaJS is a high-performance, lightweight JavaScript date library designed for modern applications. Named after the concept of impermanence, it emphasizes an immutable approach to date manipulation, ensuring that your original data remains untouched while providing powerful tools for formatting, business logic, and social-style time.

🚀 Quick Start

Installation

npm install aniccajs

Basic Setup

import anicca from "aniccajs";

// Initialize with current time
const now = anicca();

// Human-friendly formatting
console.log(now.format("dddd, MMMM D, YYYY"));
// Output: Saturday, February 14, 2026

🛠 Usage Examples

1. Immutability & Manipulation

Every operation returns a new instance.

const today = anicca("2026-02-14");
const nextMonth = today.add(1, "month");

console.log(today.format("YYYY-MM-DD")); // 2026-02-14
console.log(nextMonth.format("YYYY-MM-DD")); // 2026-03-14

2. Social Media "Time Ago"

const postDate = anicca("2026-02-14T10:00:00");
console.log(postDate.ago()); // "11 hours ago"
console.log(anicca("Asia/Yangon").ago("2026-02-14T10:00:00")); // 11 hours ago

3. Business Logic

const deadline = anicca("2026-02-20");
console.log(deadline.isWeekend()); // false
console.log(deadline.isBusinessDay()); // true
console.log(deadline.quarter()); // 1 (Q1)

📖 Full API Reference

1. Initialization

| Method | Description | | ----------------------- | ---------------------------------------------------------------------- | | anicca() | Returns an instance with the current local system time. | | anicca(dateString) | Parses a standard date string (e.g., ISO 8601). | | anicca(timestamp) | Parses a Unix timestamp in milliseconds. | | anicca("Asia/Yangon") | Returns an instance with the current time in a specific IANA timezone. |

2. Display & Formatting

| Method | Return | Description | | -------------------- | --------- | ------------------------------------------------------------------------ | | .format(pattern) | String | Formats the date. Tokens: YYYY, MMMM, DD, dddd, HH, mm, A. | | .ago(compareDate?) | String | Returns relative time. Compares to now if no parameter is provided. | | .toDate() | Date | Returns the native JavaScript Date object. | | .valueOf() | Number | Returns the timestamp in milliseconds. | | .isValid() | Boolean | Validates if the date input is a real date. |

3. Manipulation

| Method | Return | Description | | ---------------------- | ---------- | -------------------------------------------------------------------------- | | .add(val, unit) | Instance | Adds time. Units: year, month, day, hour, minute, second. | | .subtract(val, unit) | Instance | Subtracts time based on units. | | .startOf(unit) | Instance | Resets time to the start of the unit (e.g., month sets to 1st at 00:00). |

4. Comparison & Queries

| Method | Return | Description | | ------------------ | --------- | ------------------------------------------------------------------ | | .isToday() | Boolean | Returns true if the date is today. | | .isTomorrow() | Boolean | Returns true if the date is tomorrow. | | .isYesterday() | Boolean | Returns true if the date was yesterday. | | .isWeekend() | Boolean | Returns true for Saturday or Sunday. | | .isBusinessDay() | Boolean | Returns true for Monday through Friday. | | .isLeapYear() | Boolean | Returns true if the year is a leap year. | | .isBetween(s, e) | Boolean | Returns true if date falls within the start (s) and end (e) range. |

5. Business & Calendar Logic

| Method | Return | Description | | ---------------------- | -------- | ----------------------------------------------------------------- | | .week() | Number | Returns the ISO week number (1-53). | | .daysInMonth() | Number | Returns the number of days in the current month. | | .quarter() | Number | Returns the quarter of the year (1-4). | | .fiscalYear(start) | Number | Returns fiscal year (Default start: 3 for April). | | .diffBusinessDays(t) | Number | Calculates the number of working days between now and target (t). |

6. Static Methods

| Method | Description | | ----------------------- | ----------------------------------------------------------------------------- | | anicca.range(s, e) | Generates an array of Anicca instances for every day between start and end. | | anicca.duration(v, u) | Converts a value and unit into raw milliseconds. |


🔠 Formatting Tokens Reference

| Token | Output | Description | | -------- | -------- | ---------------- | | YYYY | 2026 | 4-digit year | | MMMM | February | Full month name | | MMM | Feb | Short month name | | DD | 14 | 2-digit day | | dddd | Saturday | Full day name | | HH | 21 | 24-hour clock | | mm | 15 | Minutes | | A | PM/AM | Meridiem |


⚖️ License

MIT © 2026 AniccaJS