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

monthly

v0.6.7

Published

A simplified way to show a calendar month in any console.

Readme

monthly Build Status Coverage Status License: ISC

A simplified way to show a calendar month in any console.

API / Signature

The exported module is a function that accepts an object with the following properties:

  • date: the mandatory date object to use in order to display the month
  • startDay: the optional day of the week to use as starting day, by default it's 1 (Monday)
  • freeDay: one or more optional days of the week to consider free, by default [0, 6] (Sunday, Saturday)
  • locale: the optional locale to use, by default en
  • table: an optional boolean value to indicate the layout should be a proper table, by default it's false
  • year: an optional boolean value to indicate if the month name should be followed the date year, by default it's false
  • highlight: an optional day of the month, eventually as list, to highlight. By default it's the current date.
  • blink: an optional day of the month, eventually as list, to show blinking, where possible. By default it's an empty list
  • bold: an optional day of the month, eventually as list, to show as bold, where possible. By default it's an empty list
  • dim: an optional day of the month, eventually as list, to show dimmed, where possible. By default it's an empty list
  • underline: an optional day of the month, eventually as list, to show underlined, where possible. By default it's an empty list

About Days

The date.getDay() method returns 0 for Sunday, 1 for Monday, and all other days 'till 6 for Saturday.

Both startDay and freeDay use this numeric convention for days of the week, but every other property uses the actual day of the month, which is never 0 or greater than 31.

You can also pass just dates objects for every other field that is not startDay or freeDay, the function will convert those automatically.

Usage Example

// import monthly from 'monthly';
// or ...
var monthly = require('monthly');

var rows = monthly({
  date: new Date,
  startDay: 1,
  freeDay: [0, 6],
  locale: 'en',
  highlight: [3, 9, 11, 20],
  blink: 9,
  bold: 10,
  dim: 28,
  underline: 12,
  table: false,
  year: false
});

console.log(rows.join('\n'));

Please note the function returns an array, so that it's possible to stack more months per row as shown via npm test.

As CLI

Usage: monthly [options]

Options:

  --holidays <cc>    dim holidays for an ISO 3166 country (de gb it us) and underline if national.
  -m, --month <mm>   display a calendar for the month. (default: 8)
  -y, --year [yyyy]  display a calendar for the whole year. (default: 2018)
  -s, --sunday       display Sunday as the first day of the week.
  -3, --three        display three months spanning the date.
  -v, --version      output the version number
  -h, --help         output usage information

Please note the ISO 3166 country must be available in this repository.

If not available, --holidays won't have any meaning so please file PRs if you'd like your country vacations listed in here, following this example file, thanks.

Screenshot

the whole year in console