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

calendar-tabs

v1.0.0

Published

Generate year or single-month calendar grids as tab-, CSV-, or TSV-delimited text for pasting into spreadsheets or scripting date-based reports. Sunday or Monday week start, per-month file splitting, format auto-detected from the output file extension.

Readme

calendar-tabs

Generate a year or single-month calendar grid as tab-, CSV-, or TSV-delimited text — for pasting straight into a spreadsheet, or for scripting date-based reports.

npx calendar-tabs 2026
npx calendar-tabs 2026 2 -o feb.csv
npx calendar-tabs 2026 -o cal.csv -s
npx calendar-tabs --help

Or install it: npm i -g calendar-tabs, then run calendar-tabs ....

Hardened: 2026-10-30 · 3722eba · gate CLOSED WITH FOLLOW-UPS

What it’s good for

Dropping a real calendar grid into a spreadsheet without fighting a spreadsheet app’s own date functions, or generating month-by-month text/CSV/TSV files for a script further down a pipeline. Output format is auto-detected from the -o file extension, so the same command produces tab-delimited text, comma-separated, or tab-separated depending only on what you name the file.

Examples

Print the current year’s grid to the screen (tab-delimited, no header row):

npx calendar-tabs 2026
### January 2026
				1	2	3
4	5	6	7	8	9	10
11	12	13	14	15	16	17
18	19	20	21	22	23	24
25	26	27	28	29	30	31

### February 2026
1	2	3	4	5	6	7
8	9	10	11	12	13	14
...

A single month, written to a CSV file (extension turns on the day-name header row and comma separators):

npx calendar-tabs 2026 1 -o january.csv
### January 2026
Sun,Mon,Tue,Wed,Thu,Fri,Sat
,,,,1,2,3
4,5,6,7,8,9,10
11,12,13,14,15,16,17
18,19,20,21,22,23,24
25,26,27,28,29,30,31

Monday-start week (-m), same month:

npx calendar-tabs 2026 2 -m
### February 2026
						1
2	3	4	5	6	7	8
9	10	11	12	13	14	15
16	17	18	19	20	21	22
23	24	25	26	27	28

A full year, split into twelve separate files:

npx calendar-tabs 2026 -o cal.csv -s
Generating separate files in 'current directory'...
  ✓ Created: cal-01.csv
  ✓ Created: cal-02.csv
  ...
  ✓ Created: cal-12.csv

Options

| Flag | Description | |---|---| | -m, --monday | Start the week on Monday. Default is Sunday. | | -o, --output | Base filename. The extension picks the format: .csv → comma-separated with a day-name header row; .tsv → tab-separated with a header row; anything else (or omitted) → plain tabs, no header. | | -s, --split | Save each month as its own file (<base>-01.<ext> … <base>-12.<ext>) instead of one combined file. Without -o, the base name is the year and the extension .txt. | | -h, --help | Show usage and exit. |

Arguments

| Argument | Description | |---|---| | year | The year to generate, a whole number from 1 to 9999, e.g. 2026. Required. Years below 100 mean what they say: 50 is AD 50, not 1950. | | month | Optional month number, 1–12 (02 is fine; names like feb are not accepted). Omit it to generate the whole year. |

Notes

  • Without -o, output goes to stdout.

  • With -o but without -s, all requested months are written to the one file, separated by a blank line.

  • With -s and no -o, each month is still split into its own file, named <year>-01.txt … <year>-12.txt in the current directory.

  • With -o and -s, each month is written to its own file: <base>-01.<ext> … <base>-12.<ext>.

  • Dates are computed in UTC on the proleptic Gregorian calendar, so the grid is the same in every time zone.

Exit codes

| Code | Meaning | |---|---| | 0 | Success (including --help). | | 1 | A file could not be written. In -s mode the other months are still written, and the run exits 1 if any one failed. | | 2 | Bad command line: an unknown flag, a missing option value, a year outside 1–9999, a month outside 1–12, or more than two arguments. Nothing is printed to stdout and no file is written. |

Known limits

  • The calendar is proleptic Gregorian for every year. Dates before the Gregorian reform (1582, or 1752 in Britain and its colonies) do not match the Julian calendar in use at the time; the BSD cal command, for one, switches to Julian before September 1752, so it disagrees with this tool for those years.

  • An output name that is only an extension, such as -o .csv, is treated as a file named .csv with no extension, so it gets plain tabs. Give the file a name (-o cal.csv).

  • Not tested on Windows (paths and line endings).

Requirements

Node 18.3 or later (for util.parseArgs).

License

MIT