# Date and Time Calculator

## Links

- Product page URL: https://www.agentpmt.com/marketplace/date-calculator-and-timestamp-tool-set
- Product markdown URL: https://www.agentpmt.com/marketplace/date-calculator-and-timestamp-tool-set?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/date-calculator-and-timestamp-tool-set?format=agent-json

## Overview

- Product ID: 69489f4eb54506f955d789ea
- Vendor: Apoth3osis
- Type: core utility
- Unit type: request
- Price: 500 credits
- Categories: Data Processing, Date & Time Utilities
- Generated at: 2026-06-02T16:28:21.300Z

### Page Description

Time Tools is a date and time utility providing 18 operations across two categories: time calculations and format conversions.
Time calculation operations handle date arithmetic and temporal analysis. These include calculating time remaining until a future date, calculating time elapsed since a past date, adding or subtracting days from a date, counting total days between two dates, counting business days (weekdays only) between two dates, converting datetimes between timezones, retrieving UTC offset for any timezone, formatting duration in seconds to human-readable text, parsing human-readable duration strings (such as "2h 30m") into seconds, getting ISO week number for a date, determining fiscal quarter (1–4), checking leap year status, checking if two time periods overlap, and converting Unix timestamps to ISO format.
Conversion operations handle format transformations between Unix timestamps, formatted date strings, and human-readable durations. Unix timestamps can be converted to formatted dates with optional timezone specification, date strings can be converted to Unix timestamps using configurable format patterns, and raw seconds can be converted to compact human-readable format (such as "1d 2h 30m 15s").
Date parsing is flexible and accepts multiple input formats. All timezone operations use the pytz library and support standard timezone names.

### Agent Description

Date/time calculations: add/subtract days, business days, time until/since, timezone conversion, week numbers, quarters, duration parsing.

## Details

### Details

Time Tools is a date and time utility providing 18 operations across two categories: time calculations and format conversions.
Time calculation operations handle date arithmetic and temporal analysis. These include calculating time remaining until a future date, calculating time elapsed since a past date, adding or subtracting days from a date, counting total days between two dates, counting business days (weekdays only) between two dates, converting datetimes between timezones, retrieving UTC offset for any timezone, formatting duration in seconds to human-readable text, parsing human-readable duration strings (such as "2h 30m") into seconds, getting ISO week number for a date, determining fiscal quarter (1–4), checking leap year status, checking if two time periods overlap, and converting Unix timestamps to ISO format.
Conversion operations handle format transformations between Unix timestamps, formatted date strings, and human-readable durations. Unix timestamps can be converted to formatted dates with optional timezone specification, date strings can be converted to Unix timestamps using configurable format patterns, and raw seconds can be converted to compact human-readable format (such as "1d 2h 30m 15s").
Date parsing is flexible and accepts multiple input formats. All timezone operations use the pytz library and support standard timezone names.

### Actions

- `time-until` (5 credits): Calculate time remaining until a future date. Returns days, hours, minutes, seconds.
- `time-since` (5 credits): Calculate time elapsed since a past date. Returns days, hours, minutes, seconds.
- `add-days` (5 credits): Add a number of days to a date. Returns the resulting date in ISO format.
- `subtract-days` (5 credits): Subtract a number of days from a date. Returns the resulting date in ISO format.
- `add-hours` (5 credits): Add hours to a datetime. Returns the resulting datetime in ISO format.
- `subtract-hours` (5 credits): Subtract hours from a datetime. Returns the resulting datetime in ISO format.
- `add-minutes` (5 credits): Add minutes to a datetime. Returns the resulting datetime in ISO format.
- `subtract-minutes` (5 credits): Subtract minutes from a datetime. Returns the resulting datetime in ISO format.
- `days-between` (5 credits): Calculate the number of calendar days between two dates.
- `business-days-between` (5 credits): Calculate the number of business days (weekdays only, Mon-Fri) between two dates. Does not account for public holidays.
- `convert-timezone` (5 credits): Convert a datetime from one timezone to another. Uses IANA timezone names.
- `timezone-offset` (5 credits): Get the current UTC offset for a timezone.
- `format-duration` (5 credits): Format a number of seconds into human-readable text (e.g., '2 days, 3 hours, 15 minutes').
- `parse-duration` (5 credits): Parse a human-readable duration string into total seconds. Supports s/sec/seconds, m/min/minutes, h/hr/hours, d/day/days.
- `week-number` (5 credits): Get the ISO week number (1-53) for a date.
- `quarter` (5 credits): Get the fiscal quarter (1-4) for a date.
- `is-leap-year` (5 credits): Check whether a given year is a leap year.
- `working-hours-overlap` (5 credits): Check whether two time periods overlap. Useful for scheduling across time zones.
- `unix-to-iso` (5 credits): Convert a Unix timestamp to ISO 8601 format.
- `unix-to-date` (5 credits): Convert a Unix timestamp to a formatted date string, optionally in a specific timezone.
- `date-to-unix` (5 credits): Convert a date string to a Unix timestamp.
- `seconds-to-human` (5 credits): Convert seconds to compact human-readable format (e.g., '1d 2h 30m 15s').

### Use Cases

Building countdown timers for events or deadlines, calculating project durations in business days excluding weekends, scheduling meetings across multiple timezones, converting API timestamps to human-readable formats, parsing user-entered durations like "2 hours 30 minutes" into seconds, determining fiscal quarters for financial reporting, validating date ranges for booking systems, checking working hours overlap between distributed teams, generating relative timestamps for activity feeds, calculating age or tenure from start dates, converting between Unix epoch and display formats for logs, determining week numbers for sprint planning, building time-tracking applications, validating leap years for date calculations, formatting elapsed time for dashboards and reports.

### Workflows Using This Tool

#### Appointment Scheduling and Route Planner

Takes a CSV or spreadsheet file with addresses, asks for a starting drive time, time per stop, and starting address, then parses the addresses, optimizes the driving route, calculates estimated arrival and departure times for each location, and generates a CSV with the full schedule. Returns the optimized route map, Google Maps directions link, and the schedule CSV both locally and via notification. Ideal for field sales, service technicians, delivery planning, or any multi-stop appointment scheduling.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/appointment-scheduling-and-route-planner
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/appointment-scheduling-and-route-planner?format=agent-md
- Published: 2026-04-19T18:29:42.593Z

#### Route Planner From Address Photos

Automates multi-stop route planning from photos of addresses. Collects the user's starting address, time needed at each stop, and departure time. Processes uploaded images through OCR to extract addresses, compiles them into a CSV, optimizes the route order, calculates arrival and departure times for each location, and delivers the final plan with a map image, detailed schedule, and Google Maps link.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/address-image-route-planner
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/address-image-route-planner?format=agent-md
- Published: 2026-04-19T18:29:42.593Z

#### Accounts Receivable Follow-Up

Automates collections by pulling overdue invoices from Zoho Books, calculating days overdue, drafting collection emails with appropriate urgency levels, sending reminders to customers, and tracking collection efforts in a spreadsheet. Improves cash flow by ensuring consistent follow-up on unpaid invoices.

- Page URL: https://www.agentpmt.com/agent-workflow-skills/accounts-receivable-follow-up
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/accounts-receivable-follow-up?format=agent-md
- Published: 2026-02-15T19:19:27.272Z

### Related Content

No related content is currently linked to this product.

## Integration Details

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp?platform=claude#videos
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp?platform=chatgpt#videos
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp?platform=cursor#videos
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp?platform=windsurf#videos

Use the local router for command-based MCP clients. It forwards requests to `https://api.agentpmt.com/mcp` and does not execute tools locally.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "69489f4eb54506f955d789ea",
    "parameters": {
      "action": "time-until",
      "target_date": "example_target_date"
    }
  }'
```

### Autonomous Agents

Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.

- Autonomous Agent API reference URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents
- Autonomous Agent API reference markdown URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents?format=agent-md
- Credit-Based Access Using AgentAddress: https://www.agentpmt.com/docs/autonomous-agents/credit-based-tool-usage-with-agentaddress
- AgentAddress is preferred for persistent file access, stored platform state, and maximum tool use ability across repeated calls.
- Direct x402 is for independent one-off tool calls that do not require shared files or stored platform state.
- Direct x402 public payments: USDC on Base, Arbitrum, Optimism, Polygon, and Avalanche.

### Schema

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "time-until": {
      "description": "Calculate time remaining until a future date. Returns days, hours, minutes, seconds.",
      "properties": {
        "target_date": {
          "type": "string",
          "description": "Target date in ISO format or any parseable format (e.g., '2026-12-31T23:59:59', 'December 31, 2026').",
          "required": true
        }
      }
    },
    "time-since": {
      "description": "Calculate time elapsed since a past date. Returns days, hours, minutes, seconds.",
      "properties": {
        "past_date": {
          "type": "string",
          "description": "Past date in ISO format or any parseable format.",
          "required": true
        }
      }
    },
    "add-days": {
      "description": "Add a number of days to a date. Returns the resulting date in ISO format.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Starting date in ISO or parseable format.",
          "required": true
        },
        "days": {
          "type": "integer",
          "description": "Number of days to add.",
          "required": true
        }
      }
    },
    "subtract-days": {
      "description": "Subtract a number of days from a date. Returns the resulting date in ISO format.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Starting date in ISO or parseable format.",
          "required": true
        },
        "days": {
          "type": "integer",
          "description": "Number of days to subtract.",
          "required": true
        }
      }
    },
    "add-hours": {
      "description": "Add hours to a datetime. Returns the resulting datetime in ISO format.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Starting datetime in ISO or parseable format.",
          "required": true
        },
        "hours": {
          "type": "number",
          "description": "Number of hours to add (supports decimals, e.g., 5.5).",
          "required": true
        }
      }
    },
    "subtract-hours": {
      "description": "Subtract hours from a datetime. Returns the resulting datetime in ISO format.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Starting datetime in ISO or parseable format.",
          "required": true
        },
        "hours": {
          "type": "number",
          "description": "Number of hours to subtract.",
          "required": true
        }
      }
    },
    "add-minutes": {
      "description": "Add minutes to a datetime. Returns the resulting datetime in ISO format.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Starting datetime in ISO or parseable format.",
          "required": true
        },
        "minutes": {
          "type": "number",
          "description": "Number of minutes to add.",
          "required": true
        }
      }
    },
    "subtract-minutes": {
      "description": "Subtract minutes from a datetime. Returns the resulting datetime in ISO format.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Starting datetime in ISO or parseable format.",
          "required": true
        },
        "minutes": {
          "type": "number",
          "description": "Number of minutes to subtract.",
          "required": true
        }
      }
    },
    "days-between": {
      "description": "Calculate the number of calendar days between two dates.",
      "properties": {
        "start_date": {
          "type": "string",
          "description": "Start date in ISO or parseable format.",
          "required": true
        },
        "end_date": {
          "type": "string",
          "description": "End date in ISO or parseable format.",
          "required": true
        }
      }
    },
    "business-days-between": {
      "description": "Calculate the number of business days (weekdays only, Mon-Fri) between two dates. Does not account for public holidays.",
      "properties": {
        "start_date": {
          "type": "string",
          "description": "Start date in ISO or parseable format.",
          "required": true
        },
        "end_date": {
          "type": "string",
          "description": "End date in ISO or parseable format.",
          "required": true
        }
      }
    },
    "convert-timezone": {
      "description": "Convert a datetime from one timezone to another. Uses IANA timezone names.",
      "properties": {
        "date_string": {
          "type": "string",
          "description": "Datetime string to convert.",
          "required": true
        },
        "from_timezone": {
          "type": "string",
          "description": "Source timezone (e.g., 'America/New_York').",
          "required": true
        },
        "to_timezone": {
          "type": "string",
          "description": "Target timezone (e.g., 'Europe/London').",
          "required": true
        }
      }
    },
    "timezone-offset": {
      "description": "Get the current UTC offset for a timezone.",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone name (e.g., 'America/New_York', 'UTC', 'Europe/London').",
          "required": true
        }
      }
    },
    "format-duration": {
      "description": "Format a number of seconds into human-readable text (e.g., '2 days, 3 hours, 15 minutes').",
      "properties": {
        "seconds": {
          "type": "number",
          "description": "Duration in seconds to format.",
          "required": true
        }
      }
    },
    "parse-duration": {
      "description": "Parse a human-readable duration string into total seconds. Supports s/sec/seconds, m/min/minutes, h/hr/hours, d/day/days.",
      "properties": {
        "duration_str": {
          "type": "string",
          "description": "Duration text to parse (e.g., '2h 30m 15s', '5 days 3 hours').",
          "required": true
        }
      }
    },
    "week-number": {
      "description": "Get the ISO week number (1-53) for a date.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Date to check in ISO or parseable format.",
          "required": true
        }
      }
    },
    "quarter": {
      "description": "Get the fiscal quarter (1-4) for a date.",
      "properties": {
        "date": {
          "type": "string",
          "description": "Date to check in ISO or parseable format.",
          "required": true
        }
      }
    },
    "is-leap-year": {
      "description": "Check whether a given year is a leap year.",
      "properties": {
        "year": {
          "type": "integer",
          "description": "Year to check.",
          "required": true,
          "minimum": 1
        }
      }
    },
    "working-hours-overlap": {
      "description": "Check whether two time periods overlap. Useful for scheduling across time zones.",
      "properties": {
        "start1": {
          "type": "string",
          "description": "Start time of first period in HH:MM format (e.g., '09:00').",
          "required": true
        },
        "end1": {
          "type": "string",
          "description": "End time of first period in HH:MM format (e.g., '17:00').",
          "required": true
        },
        "start2": {
          "type": "string",
          "description": "Start time of second period in HH:MM format (e.g., '14:00').",
          "required": true
        },
        "end2": {
          "type": "string",
          "description": "End time of second period in HH:MM format (e.g., '22:00').",
          "required": true
        }
      }
    },
    "unix-to-iso": {
      "description": "Convert a Unix timestamp to ISO 8601 format.",
      "properties": {
        "timestamp": {
          "type": "number",
          "description": "Unix timestamp in seconds since epoch.",
          "required": true
        }
      }
    },
    "unix-to-date": {
      "description": "Convert a Unix timestamp to a formatted date string, optionally in a specific timezone.",
      "properties": {
        "timestamp": {
          "type": "number",
          "description": "Unix timestamp in seconds since epoch.",
          "required": true
        },
        "timezone": {
          "type": "string",
          "description": "Timezone name (defaults to local time). Example: 'America/Chicago'.",
          "required": false
        }
      }
    },
    "date-to-unix": {
      "description": "Convert a date string to a Unix timestamp.",
      "properties": {
        "date_string": {
          "type": "string",
          "description": "Date string to convert.",
          "required": true
        },
        "date_format": {
          "type": "string",
          "description": "Python strftime format string for parsing (default: '%Y-%m-%d %H:%M:%S'). If omitted, common formats are tried automatically.",
          "required": false,
          "default": "%Y-%m-%d %H:%M:%S"
        }
      }
    },
    "seconds-to-human": {
      "description": "Convert seconds to compact human-readable format (e.g., '1d 2h 30m 15s').",
      "properties": {
        "seconds": {
          "type": "number",
          "description": "Number of seconds to convert.",
          "required": true
        }
      }
    }
  },
  "properties": {
    "action": {
      "type": "string",
      "description": "Use 'get_instructions' to retrieve documentation. The time operation to perform. Available actions: Time Calculations (time-until, time-since, add-days, subtract-days, add-hours, subtract-hours, add-minutes, subtract-minutes, days-between, business-days-between, convert-timezone, timezone-offset, format-duration, parse-duration, week-number, quarter, is-leap-year, working-hours-overlap, unix-to-iso), Conversions (unix-to-date, date-to-unix, seconds-to-human)",
      "required": true,
      "enum": [
        "get_instructions",
        "time-until",
        "time-since",
        "add-days",
        "subtract-days",
        "add-hours",
        "subtract-hours",
        "add-minutes",
        "subtract-minutes",
        "days-between",
        "business-days-between",
        "convert-timezone",
        "timezone-offset",
        "format-duration",
        "parse-duration",
        "week-number",
        "quarter",
        "is-leap-year",
        "working-hours-overlap",
        "unix-to-iso",
        "unix-to-date",
        "date-to-unix",
        "seconds-to-human"
      ]
    },
    "date": {
      "type": "string",
      "description": "Date/datetime string in ISO format or any parseable format. Required for: add-days, subtract-days, add-hours, subtract-hours, add-minutes, subtract-minutes, week-number, quarter",
      "required": false
    },
    "target_date": {
      "type": "string",
      "description": "Target date for calculating time until. Required for: time-until",
      "required": false
    },
    "past_date": {
      "type": "string",
      "description": "Past date for calculating time since. Required for: time-since",
      "required": false
    },
    "start_date": {
      "type": "string",
      "description": "Start date for date range calculations. Required for: days-between, business-days-between",
      "required": false
    },
    "end_date": {
      "type": "string",
      "description": "End date for date range calculations. Required for: days-between, business-days-between",
      "required": false
    },
    "date_string": {
      "type": "string",
      "description": "Date string for timezone conversion or Unix conversion. Required for: convert-timezone, date-to-unix",
      "required": false
    },
    "days": {
      "type": "integer",
      "description": "Number of days to add or subtract. Required for: add-days, subtract-days",
      "required": false
    },
    "hours": {
      "type": "number",
      "description": "Number of hours to add or subtract. Required for: add-hours, subtract-hours",
      "required": false
    },
    "minutes": {
      "type": "number",
      "description": "Number of minutes to add or subtract. Required for: add-minutes, subtract-minutes",
      "required": false
    },
    "seconds": {
      "type": "number",
      "description": "Number of seconds for duration formatting or conversion. Required for: format-duration, seconds-to-human",
      "required": false
    },
    "timestamp": {
      "type": "number",
      "description": "Unix timestamp (seconds since epoch). Required for: unix-to-iso, unix-to-date",
      "required": false
    },
    "year": {
      "type": "integer",
      "description": "Year to check for leap year. Required for: is-leap-year",
      "required": false,
      "minimum": 1
    },
    "timezone": {
      "type": "string",
      "description": "Timezone name (e.g., 'America/New_York', 'UTC', 'Europe/London'). Required for: timezone-offset. Optional for: unix-to-date",
      "required": false
    },
    "from_timezone": {
      "type": "string",
      "description": "Source timezone for conversion (e.g., 'America/New_York'). Required for: convert-timezone",
      "required": false
    },
    "to_timezone": {
      "type": "string",
      "description": "Target timezone for conversion (e.g., 'Europe/London'). Required for: convert-timezone",
      "required": false
    },
    "duration_str": {
      "type": "string",
      "description": "Human-readable duration string (e.g., '2h 30m', '5 days 3 hours'). Required for: parse-duration",
      "required": false
    },
    "format": {
      "type": "string",
      "description": "Date format string for parsing dates (default: '%Y-%m-%d %H:%M:%S'). Optional for: date-to-unix",
      "required": false,
      "default": "%Y-%m-%d %H:%M:%S"
    },
    "start1": {
      "type": "string",
      "description": "Start time of first period in HH:MM format (e.g., '09:00'). Required for: working-hours-overlap",
      "required": false
    },
    "end1": {
      "type": "string",
      "description": "End time of first period in HH:MM format (e.g., '17:00'). Required for: working-hours-overlap",
      "required": false
    },
    "start2": {
      "type": "string",
      "description": "Start time of second period in HH:MM format (e.g., '14:00'). Required for: working-hours-overlap",
      "required": false
    },
    "end2": {
      "type": "string",
      "description": "End time of second period in HH:MM format (e.g., '18:00'). Required for: working-hours-overlap",
      "required": false
    }
  }
}
```

### Usage Instructions

# Date and Time Calculator

Comprehensive date/time calculations, timezone conversions, and duration tools.

## Actions

### time-until
Calculate time remaining until a future date.
- **Required:** `target_date` (string) - Target date in ISO or parseable format
- **Example:** `{"action": "time-until", "target_date": "2026-12-31T23:59:59"}`

### time-since
Calculate time elapsed since a past date.
- **Required:** `past_date` (string) - Past date in ISO or parseable format
- **Example:** `{"action": "time-since", "past_date": "2024-01-01"}`

### add-days
Add a number of days to a date.
- **Required:** `date` (string) - Starting date; `days` (integer) - Number of days to add
- **Example:** `{"action": "add-days", "date": "2026-03-10", "days": 30}`

### subtract-days
Subtract a number of days from a date.
- **Required:** `date` (string) - Starting date; `days` (integer) - Number of days to subtract
- **Example:** `{"action": "subtract-days", "date": "2026-03-10", "days": 14}`

### add-hours
Add hours to a datetime.
- **Required:** `date` (string) - Starting datetime; `hours` (number) - Hours to add
- **Example:** `{"action": "add-hours", "date": "2026-03-10T09:00:00", "hours": 5.5}`

### subtract-hours
Subtract hours from a datetime.
- **Required:** `date` (string) - Starting datetime; `hours` (number) - Hours to subtract
- **Example:** `{"action": "subtract-hours", "date": "2026-03-10T17:00:00", "hours": 3}`

### add-minutes
Add minutes to a datetime.
- **Required:** `date` (string) - Starting datetime; `minutes` (number) - Minutes to add
- **Example:** `{"action": "add-minutes", "date": "2026-03-10T09:00:00", "minutes": 45}`

### subtract-minutes
Subtract minutes from a datetime.
- **Required:** `date` (string) - Starting datetime; `minutes` (number) - Minutes to subtract
- **Example:** `{"action": "subtract-minutes", "date": "2026-03-10T10:30:00", "minutes": 15}`

### days-between
Calculate the number of calendar days between two dates.
- **Required:** `start_date` (string) - Start date; `end_date` (string) - End date
- **Example:** `{"action": "days-between", "start_date": "2026-01-01", "end_date": "2026-12-31"}`

### business-days-between
Calculate the number of business days (weekdays only, Mon-Fri) between two dates.
- **Required:** `start_date` (string) - Start date; `end_date` (string) - End date
- **Example:** `{"action": "business-days-between", "start_date": "2026-03-01", "end_date": "2026-03-31"}`

### convert-timezone
Convert a datetime from one timezone to another.
- **Required:** `date_string` (string) - Datetime to convert; `from_timezone` (string) - Source timezone; `to_timezone` (string) - Target timezone
- **Example:** `{"action": "convert-timezone", "date_string": "2026-03-10 09:00:00", "from_timezone": "America/New_York", "to_timezone": "Europe/London"}`

### timezone-offset
Get the current UTC offset for a timezone.
- **Required:** `timezone` (string) - Timezone name (e.g., "America/New_York", "Europe/London", "Asia/Tokyo")
- **Example:** `{"action": "timezone-offset", "timezone": "America/Los_Angeles"}`

### format-duration
Format a number of seconds into human-readable text (e.g., "2 days, 3 hours, 15 minutes").
- **Required:** `seconds` (number) - Duration in seconds
- **Example:** `{"action": "format-duration", "seconds": 90061}`

### parse-duration
Parse a human-readable duration string into total seconds. Supports units: s/sec/seconds, m/min/minutes, h/hr/hours, d/day/days.
- **Required:** `duration_str` (string) - Duration text to parse
- **Example:** `{"action": "parse-duration", "duration_str": "2h 30m 15s"}`

### week-number
Get the ISO week number (1-53) for a date.
- **Required:** `date` (string) - Date to check
- **Example:** `{"action": "week-number", "date": "2026-03-10"}`

### quarter
Get the fiscal quarter (1-4) for a date.
- **Required:** `date` (string) - Date to check
- **Example:** `{"action": "quarter", "date": "2026-08-15"}`

### is-leap-year
Check whether a given year is a leap year.
- **Required:** `year` (integer) - Year to check (minimum: 1)
- **Example:** `{"action": "is-leap-year", "year": 2028}`

### working-hours-overlap
Check whether two time periods overlap (useful for scheduling across time zones).
- **Required:** `start1` (string) - Start of first period (HH:MM); `end1` (string) - End of first period (HH:MM); `start2` (string) - Start of second period (HH:MM); `end2` (string) - End of second period (HH:MM)
- **Example:** `{"action": "working-hours-overlap", "start1": "09:00", "end1": "17:00", "start2": "14:00", "end2": "22:00"}`

### unix-to-iso
Convert a Unix timestamp to ISO 8601 format.
- **Required:** `timestamp` (number) - Unix timestamp in seconds
- **Example:** `{"action": "unix-to-iso", "timestamp": 1773331200}`

### unix-to-date
Convert a Unix timestamp to a formatted date string, optionally in a specific timezone.
- **Required:** `timestamp` (number) - Unix timestamp in seconds
- **Optional:** `timezone` (string) - Timezone name (defaults to local time)
- **Example:** `{"action": "unix-to-date", "timestamp": 1773331200, "timezone": "America/Chicago"}`

### date-to-unix
Convert a date string to a Unix timestamp.
- **Required:** `date_string` (string) - Date string to convert
- **Optional:** `format` (string) - Date format pattern (default: "%Y-%m-%d %H:%M:%S")
- **Example:** `{"action": "date-to-unix", "date_string": "2026-03-10 12:00:00"}`

### seconds-to-human
Convert seconds to a compact human-readable format (e.g., "1d 2h 30m 15s").
- **Required:** `seconds` (number) - Number of seconds
- **Example:** `{"action": "seconds-to-human", "seconds": 95415}`

## Common Workflows

**Project deadline countdown:** Use `time-until` with the deadline date to show remaining time, then `business-days-between` to count working days left.

**Meeting scheduling across time zones:** Use `convert-timezone` to align meeting times, then `working-hours-overlap` to confirm both parties are within work hours.

**Date arithmetic for invoicing:** Use `add-days` to compute due dates (e.g., Net 30), or `subtract-days` to find a billing period start.

**Log timestamp conversion:** Use `unix-to-iso` or `unix-to-date` to convert raw timestamps into readable dates, or `date-to-unix` to convert back.

## Important Notes
- Dates accept ISO 8601 format or most common parseable formats (e.g., "March 10, 2026", "2026-03-10", "10/03/2026").
- Timezone names use the IANA database (e.g., "America/New_York", "Europe/London", "Asia/Tokyo", "UTC").
- `business-days-between` counts weekdays only (Monday through Friday) and does not account for public holidays.
- `format-duration` produces verbose output ("2 days, 3 hours") while `seconds-to-human` produces compact output ("2d 3h").
- `parse-duration` supports flexible input: "2h 30m", "5 days 3 hours", "90s", etc.

### Frequently Asked Questions

#### How do I connect this tool to an external agent?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

#### How does an external agent use this tool?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:

> Call the AgentPMT-Tool-Search-and-Execution tool with action 'get\_schema' and tool\_id 69489f4eb54506f955d789ea ("Date and Time Calculator"). Then call the same tool with action 'call\_tool', tool\_id 69489f4eb54506f955d789ea, and the parameters needed for my request.

The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

### Dependencies

This product has no public dependency products.