date-calculator

Calculate dates and datetimes from natural language descriptions using BSD date commands.

1|Updated Jul 1, 2024
One-click install
npx skills add https://github.com/gsong/home-directory --skill date-calculator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: date-calculator
Source: https://github.com/gsong/home-directory/tree/main/.claude/skills/date-calculator
Command: npx skills add https://github.com/gsong/home-directory --skill date-calculator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manually calculating specific dates, relative times, or converting between timezones can be tedious and prone to errors. This Skill automates all your date and datetime calculations, ensuring accuracy and saving you valuable time.

Core Features & Use Cases

  • Natural Language Processing: Understands complex date and time requests like "7 days ago," "next Monday," or "3 hours from now."
  • Precise Calculations: Leverages expert knowledge of BSD date commands (macOS compatible) for accurate results.
  • Flexible Formatting: Provides results in various formats, including ISO 8601 and YYYY-MM-DD, and handles UTC conversions.
  • Use Case: Quickly determine the exact date for "last month's report" or get a precise timestamp for "logs from the last 3 hours" without manual lookup or scripting.

Quick Start

What date was it 3 weeks ago? Calculate the timestamp for next Tuesday at 9 AM UTC. What is the date 45 days from now?

Frequently Asked Questions about date-calculator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate dates from natural language descriptions like '7 days ago' or 'next Monday'?

Date calculation from natural language converts relative time expressions into precise dates using BSD date commands. Describe your time reference (past, future, or specific day), and the Skill parses it into an exact date or timestamp, handling day-of-week references, relative offsets, and timezone conversions automatically.

Can I use date calculations for scheduling and log analysis on macOS?

Yes, macOS date calculations work for scheduling and log analysis workflows. The Skill leverages BSD date's -v relative flags to compute timestamps for past logs, future scheduled tasks, and timezone-aware scheduling, making it compatible with macOS automation tools and bash scripting.

What date formats does this support, and can I convert to UTC?

Date formatting supports ISO 8601, YYYY-MM-DD, and other standard formats with optional UTC conversion. Results are provided in your chosen format, enabling seamless integration with logging systems, APIs, and scheduling tools that require specific timestamp formats or timezone handling.

How do I find the exact timestamp for logs from the last 3 hours without manual calculation?

Specify your relative time window (last 3 hours, yesterday, 2 weeks ago) and the Skill calculates the precise timestamp instantly. This eliminates manual date math for log queries, report date ranges, and time-based filtering in bash scripts and software workflows.

Does date calculation work with complex relative time expressions like '3 hours from now' or 'last month's date'?

Complex relative expressions including future offsets, historical references, and compound descriptions are all supported. The Skill interprets combinations like 'last month's report date' or 'next Tuesday at 9 AM' and returns unambiguous, formatted timestamps for scheduling and analysis.