HTTP/1.1 402 PAYMENT REQUIRED agent402.base.eth · BASE · SOLANA · POLYGON · ARBITRUM · STELLAR · ROBINHOOD · USDC · USDG

Date math

Date calculations in one pass: difference between two dates, add time to a date, and compute age from a birthdate.

When to use this pack

An agent needs to answer date questions: how many days between two events, what date is 30 days from now, how old is someone. Common in scheduling, contract management, and user-profile logic.

Tools in this pack

Workflow

  1. Compute the difference between the two dates with date-diff — returns days, hours, minutes, and a human-readable string.
  2. Add 30 days to the start date with add-time — demonstrates forward-projection from an anchor date.
  3. Compute age from the start date as a birthdate with age — returns years, months, days.

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Run date math using Agent402: (1) date-diff {from:"2024-01-01", to:"2026-07-04"} — get difference. (2) add-time {date:"2024-01-01", amount:30, unit:"days"} — project forward. (3) age {birthdate:"2024-01-01"} — compute age. Return all three.

← All skill packs