A simple command-line tool. Calculate a day relative to today's date.
npm install daycalFor global CLI access:
npm install -g daycaldaycal <days>| Argument | Description |
|---|---|
days |
Number of days to add (positive) or subtract (negative) from today |
| Option | Description |
|---|---|
-h, --help |
Show the help message |
-v, --version |
Show the installed version |
# Today is March 21, 2026
daycal 10
# March, 31 2026
daycal -10
# March, 11 2026
daycal 0
# March, 21 2026import { dayCal } from "daycal";
const result = dayCal(10);
console.log(result); // "March, 31 2026"Returns a formatted date string relative to today.
| Parameter | Type | Description |
|---|---|---|
days |
number |
Days to add (positive) or subtract (negative) from today |
Returns: string — formatted as "Month, DD YYYY" (e.g., "March, 31 2026")
Dates are returned in the format:
Month, DD YYYY
- Month — Full month name (e.g.,
March) - DD — Two-digit day, zero-padded (e.g.,
01,15,31) - YYYY — Four-digit year
None. The date calculation is implemented directly in this package.
npm run buildMIT
