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

occasionner

v0.1.1

Published

Compute ‘round’ anniversaries of personal events (10 000 000 seconds, 600 weeks, 40 years…)

Readme

Occasionner

Computes ‘round’ anniversaries (milestones) of personal events: 10 000 000 seconds since a housewarming, 600 weeks since a wedding, 40 years since a birthday and so on.

Usage

import { computeMilestones } from "occasionner";

const milestones = computeMilestones({
  events: [
    { id: "housewarming", title: "Housewarming", start: "2023-09-01T18:00" },
  ],
  from: "2026-08-01T00:00:00Z",
  to: "2026-09-01T00:00:00Z",
  timeZone: "Europe/London",
});
// → [
//   { event, unit: "seconds", value: 92_000_000, timestamp: "2026-08-01T12:33:20Z" },
//   { event, unit: "months", value: 35, timestamp: "2026-08-01T17:00:00Z" },
//   …
// ]

Rules

  • Milestone values are round numbers: positive integers with at most two significant digits (1, 2 … 9, 10, 11 … 99, 100, 110 … 990, 1000, 1100 …).
  • Values below per-unit minimums are skipped so that the output is not dominated by tiny anniversaries. The defaults are 1 000 000 seconds, 100 000 minutes, 1000 hours, 100 days, 10 weeks, 1 month and 1 year; override them via the minValues option.
  • Seconds, minutes and hours are added as exact time. Days, weeks, months and years follow the calendar in the event’s time zone, so milestones respect daylight saving time shifts and month-end clamping (e.g. January 31 plus one month is February 28 or 29).
  • An event start may be a plain date ("2007-04-07"), a date-time ("2007-04-07T00:32"), or carry an explicit offset or time zone ("2007-04-07T00:32:00+03:00[Europe/Moscow]"). Plain values are interpreted in the timeZone passed to computeMilestones().