AgentPMT
Date and Time Calculator

Date and Time Calculator

Core Utility

Available ActionsEach successful request consumes credits as outlined below.

time-until5crtime-since5cradd-days5crsubtract-days5cradd-hours5crsubtract-hours5cradd-minutes5crsubtract-minutes5crdays-between5crbusiness-days-between5crconvert-timezone5crtimezone-offset5crformat-duration5crparse-duration5crweek-number5crquarter5cris-leap-year5crworking-hours-overlap5crunix-to-iso5crunix-to-date5crdate-to-unix5crseconds-to-human5cr

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.

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.

Actions(22)

time-until5cr1 param(1 required)

Calculate time remaining until a future date. Returns days, hours, minutes, seconds.

Calculate time remaining until a future date. Returns days, hours, minutes, seconds.

target_daterequiredstring

Target date in ISO format or any parseable format (e.g., '2026-12-31T23:59:59', 'December 31, 2026').

time-since5cr1 param(1 required)

Calculate time elapsed since a past date. Returns days, hours, minutes, seconds.

Calculate time elapsed since a past date. Returns days, hours, minutes, seconds.

past_daterequiredstring

Past date in ISO format or any parseable format.

add-days5cr2 params(2 required)

Add a number of days to a date. Returns the resulting date in ISO format.

Add a number of days to a date. Returns the resulting date in ISO format.

daterequiredstring

Starting date in ISO or parseable format.

daysrequiredinteger

Number of days to add.

subtract-days5cr2 params(2 required)

Subtract a number of days from a date. Returns the resulting date in ISO format.

Subtract a number of days from a date. Returns the resulting date in ISO format.

daterequiredstring

Starting date in ISO or parseable format.

daysrequiredinteger

Number of days to subtract.

add-hours5cr2 params(2 required)

Add hours to a datetime. Returns the resulting datetime in ISO format.

Add hours to a datetime. Returns the resulting datetime in ISO format.

daterequiredstring

Starting datetime in ISO or parseable format.

hoursrequirednumber

Number of hours to add (supports decimals, e.g., 5.5).

subtract-hours5cr2 params(2 required)

Subtract hours from a datetime. Returns the resulting datetime in ISO format.

Subtract hours from a datetime. Returns the resulting datetime in ISO format.

daterequiredstring

Starting datetime in ISO or parseable format.

hoursrequirednumber

Number of hours to subtract.

add-minutes5cr2 params(2 required)

Add minutes to a datetime. Returns the resulting datetime in ISO format.

Add minutes to a datetime. Returns the resulting datetime in ISO format.

daterequiredstring

Starting datetime in ISO or parseable format.

minutesrequirednumber

Number of minutes to add.

subtract-minutes5cr2 params(2 required)

Subtract minutes from a datetime. Returns the resulting datetime in ISO format.

Subtract minutes from a datetime. Returns the resulting datetime in ISO format.

daterequiredstring

Starting datetime in ISO or parseable format.

minutesrequirednumber

Number of minutes to subtract.

days-between5cr2 params(2 required)

Calculate the number of calendar days between two dates.

Calculate the number of calendar days between two dates.

start_daterequiredstring

Start date in ISO or parseable format.

end_daterequiredstring

End date in ISO or parseable format.

business-days-between5cr2 params(2 required)

Calculate the number of business days (weekdays only, Mon-Fri) between two dates. Does not account for public holidays.

Calculate the number of business days (weekdays only, Mon-Fri) between two dates. Does not account for public holidays.

start_daterequiredstring

Start date in ISO or parseable format.

end_daterequiredstring

End date in ISO or parseable format.

convert-timezone5cr3 params(3 required)

Convert a datetime from one timezone to another. Uses IANA timezone names.

Convert a datetime from one timezone to another. Uses IANA timezone names.

date_stringrequiredstring

Datetime string to convert.

from_timezonerequiredstring

Source timezone (e.g., 'America/New_York').

to_timezonerequiredstring

Target timezone (e.g., 'Europe/London').

timezone-offset5cr1 param(1 required)

Get the current UTC offset for a timezone.

Get the current UTC offset for a timezone.

timezonerequiredstring

Timezone name (e.g., 'America/New_York', 'UTC', 'Europe/London').

format-duration5cr1 param(1 required)

Format a number of seconds into human-readable text (e.g., '2 days, 3 hours, 15 minutes').

Format a number of seconds into human-readable text (e.g., '2 days, 3 hours, 15 minutes').

secondsrequirednumber

Duration in seconds to format.

parse-duration5cr1 param(1 required)

Parse a human-readable duration string into total seconds. Supports s/sec/seconds, m/min/minutes, h/hr/hours, d/day/days.

Parse a human-readable duration string into total seconds. Supports s/sec/seconds, m/min/minutes, h/hr/hours, d/day/days.

duration_strrequiredstring

Duration text to parse (e.g., '2h 30m 15s', '5 days 3 hours').

week-number5cr1 param(1 required)

Get the ISO week number (1-53) for a date.

Get the ISO week number (1-53) for a date.

daterequiredstring

Date to check in ISO or parseable format.

quarter5cr1 param(1 required)

Get the fiscal quarter (1-4) for a date.

Get the fiscal quarter (1-4) for a date.

daterequiredstring

Date to check in ISO or parseable format.

is-leap-year5cr1 param(1 required)

Check whether a given year is a leap year.

Check whether a given year is a leap year.

yearrequiredinteger

Year to check.

Range: 1 - ...
working-hours-overlap5cr4 params(4 required)

Check whether two time periods overlap. Useful for scheduling across time zones.

Check whether two time periods overlap. Useful for scheduling across time zones.

start1requiredstring

Start time of first period in HH:MM format (e.g., '09:00').

end1requiredstring

End time of first period in HH:MM format (e.g., '17:00').

start2requiredstring

Start time of second period in HH:MM format (e.g., '14:00').

end2requiredstring

End time of second period in HH:MM format (e.g., '22:00').

unix-to-iso5cr1 param(1 required)

Convert a Unix timestamp to ISO 8601 format.

Convert a Unix timestamp to ISO 8601 format.

timestamprequirednumber

Unix timestamp in seconds since epoch.

unix-to-date5cr2 params(1 required)

Convert a Unix timestamp to a formatted date string, optionally in a specific timezone.

Convert a Unix timestamp to a formatted date string, optionally in a specific timezone.

timestamprequirednumber

Unix timestamp in seconds since epoch.

timezonestring

Timezone name (defaults to local time). Example: 'America/Chicago'.

date-to-unix5cr2 params(1 required)

Convert a date string to a Unix timestamp.

Convert a date string to a Unix timestamp.

date_stringrequiredstring

Date string to convert.

date_formatstring

Python strftime format string for parsing (default: '%Y-%m-%d %H:%M:%S'). If omitted, common formats are tried automatically.

Default: %Y-%m-%d %H:%M:%S
seconds-to-human5cr1 param(1 required)

Convert seconds to compact human-readable format (e.g., '1d 2h 30m 15s').

Convert seconds to compact human-readable format (e.g., '1d 2h 30m 15s').

secondsrequirednumber

Number of seconds to convert.

Frequently Asked Questions

How do I connect this tool to an external agent?

Install commands

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

Hosted MCP config

{
  "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\"}"
      }
    }
  }
}

How does an external agent use this tool?

Agent prompt

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.

Workflows Using This Tool

2 / 3
Workflow
Saves ~30 min
Web Data Convertor
Multi-Location Route Optimizer W Map
Date and Time Calculator
File Management
Document OCR Agent
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.

Looking for help integrating AI into your business? Set up a free consultation.