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-betweencounts weekdays only (Monday through Friday) and does not account for public holidays.format-durationproduces verbose output ("2 days, 3 hours") whileseconds-to-humanproduces compact output ("2d 3h").parse-durationsupports flexible input: "2h 30m", "5 days 3 hours", "90s", etc.







