Skip to content
jhaugaPublic

About

A simple command-line tool. Calculate a day relative to today's date.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

dayCal

A simple command-line tool. Calculate a day relative to today's date.

Installation

npm install daycal

For global CLI access:

npm install -g daycal

CLI Usage

daycal <days>
Argument Description
days Number of days to add (positive) or subtract (negative) from today

Options

Option Description
-h, --help Show the help message
-v, --version Show the installed version

Examples

# Today is March 21, 2026

daycal 10
# March, 31 2026

daycal -10
# March, 11 2026

daycal 0
# March, 21 2026

Programmatic Usage

import { dayCal } from "daycal";

const result = dayCal(10);
console.log(result); // "March, 31 2026"

API

dayCal(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

Dependencies

None. The date calculation is implemented directly in this package.

Build

npm run build

License

MIT

About

A simple command-line tool. Calculate a day relative to today's date.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages