datecal
v1.0.0
Published
Calculate a date relative to today's date
Maintainers
Readme
A simple command-line tool. Calculate a date relative to today's date.
Installation
npm install datecalFor global CLI access:
npm install -g datecalCLI Usage
datecal <days>| Argument | Description |
|----------|-------------|
| days | Number of days to add (positive) or subtract (negative) from today |
Examples
# Today is March 21, 2026
datecal 10
# March, 31 2026
datecal -10
# March, 11 2026
datecal 0
# March, 21 2026Programmatic Usage
import { dateCal } from "datecal";
const result = dateCal(10);
console.log(result); // "March, 31 2026"API
dateCal(days: number): string
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")
Output Format
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
Build
npm run buildLicense
MIT

