Elysia Tools

Browse tools, examples, visual explainers, and topic guides from one clear workspace.

Top Categories

Hubs

Language
ZHDERUPTENFRES

Elysia Tools

Navigation

Date & Time

ISO 8601 Duration Parser & Arithmetic Workbench

· Last updated:2026-08-28

Parse ISO 8601 durations, validate ISO 8601-2 extensions, run calendar-true arithmetic, sort by real length at an anchor, and diff datetimes.

Details

What this tool helps you do

A duration calculator, not a format converter. Four modes: parse & inspect, arithmetic expression, sort by real length, and calendar difference between two datetimes.

Execution

Run this tool

Fill in the form, run the tool, and review the result in one place.

Samples

Examples that match this tool

Related

Continue with connected tools and hubs

Written by the Elysia Tools team

Tool usage guide

Learn when to use this tool, what it supports, and how real users apply it.

Key facts

Category
Date & Time
Input types
select, textarea, text
Output type
html
Sample coverage
4
API ready
Yes

Overview

The ISO 8601 Duration Parser & Arithmetic Workbench allows you to inspect standard and extended ISO 8601 duration strings, evaluate calendar-accurate arithmetic expressions, sort durations by true elapsed length, and compute intervals between datetimes.

When to use

  • When parsing and validating standard ISO 8601 or ISO 8601-2 duration strings like P1Y2M, PT36H, or P2W3D.
  • When evaluating arithmetic expressions like P1Y2M + P11M - P90D against a specific calendar anchor date.
  • When calculating the exact ISO duration between two timestamps or sorting multiple durations by elapsed length.

How it works

  1. 1Select your target workbench mode: Parse & Inspect, Arithmetic Expression, Sort by Real Length, or Datetime Difference.
  2. 2Enter your ISO 8601 duration strings, mathematical expression, or start and end timestamps into the designated input fields.
  3. 3Specify an anchor datetime to anchor variable-length calendar components such as months and leap years.
  4. 4Inspect the parsed component breakdown, canonical ISO representation, or step-by-step arithmetic calculation table.

Use cases

  • Validating Temporal.Duration and iCalendar RRULE intervals for scheduling workflows.
  • Evaluating subscription rollups and expiration dates across varying calendar month lengths.
  • Calculating exact ISO 8601 intervals between start and end events in system audit logs.

Examples

1. Inspecting Standard and Extended Durations

Backend Engineer

Background

A backend engineer needs to verify incoming schedule configurations containing mixed duration formats, including week designators and negative intervals.

Problem

The system must confirm that all duration strings parse into correct individual time components before saving them into the database.

How to use

Set mode to 'Parse & Inspect', input duration strings separated by newlines, and set the anchor datetime.

mode: parse
durationsInput: P1Y2M3DT4H5M6S\nP3W\nPT36H\n-PT30M\nP0D\nP2W3D
anchorDatetime: 2026-01-15T00:00:00Z

Outcome

Receives a component table showing canonical formats, humanized text, exact seconds relative to the anchor, and flags for 8601-2 extensions.

2. Evaluating Multi-Month Calendar Arithmetic

Subscription Billing Specialist

Background

A billing specialist needs to calculate a prorated service extension by combining several duration adjustments with a subtracted promotional period.

Problem

Adding months and subtracting days yields different calendar results depending on whether calculations cross February or leap years.

FAQ

What duration formats does the workbench support?

It supports standard designators (P1Y2M3DT4H5M6S), week formats (P3W), time-only offsets (PT36H), negative durations (-PT30M), and ISO 8601-2 combined extensions (P2W3D).

Why is an anchor datetime needed for duration arithmetic?

Calendar units like months and years do not have fixed lengths, so an anchor timestamp is required to compute accurate day offsets across month boundaries and leap years.

How does expression mode evaluate duration calculations?

It parses additive and subtractive duration terms, applies them sequentially from the anchor datetime, and reconstructs the resulting difference as a normalized ISO duration.

How does sorting durations work?

It projects each duration from the specified anchor datetime, measures the exact elapsed seconds, and orders the list from shortest to longest.

What is the difference between parse mode and diff mode?

Parse mode inspects and normalizes existing duration strings, whereas diff mode calculates the ISO 8601 duration between two distinct datetimes.

Hub

Define an ISO 8601 Reporting Period and Fiscal Week

Turn a dated reporting anchor and a stated duration into an auditable calendar endpoint, ISO week label and fiscal-quarter assignment.

Home
Tools3212
Samples593
Visualizations471
Viewers103
Hubs239
Tags333
Images, Audio & Video657

Image, audio, and video processing, conversion, and optimization tools

Math, Date & Finance647

Calculators, numerics, date logic, statistics, and finance tools

Design & Color298

Color, layout, graphics, visual styling, and design helper tools

Text & Writing209

Writing, cleanup, formatting, extraction, and text analysis tools

Developer & Web193

Developer utilities, networking, web debugging, and automation helpers

Conversion & Encoding175

Format, file, archive, unit, and encoding conversion tools

Lead Generation Quiz Launch and Contact Handoff
Memorial Drafts: Family Review and Print Handoff
Private Habit Records: Backup, Restore and Sharing Review
Article to X and LinkedIn Drafts: Fact Review and Handoff
Markdown Interactive Deck Review and Offline Handoff

© 2026 Elysia Tools. All rights reserved.

DocsPricingAboutTerms of ServicePrivacy PolicyCookiesContact
Log Processing

Nginx Log Parser Samples

Comprehensive Nginx log samples for testing log-parser tool, including access logs and error logs with various formats and scenarios

Media

ISO Viewer Samples

A ISO archive sample for in-browser preview

Java

Android Image Processing Java Samples

Android Java image processing examples including reading/saving images, scaling, and format conversion

Kotlin

Android Image Processing Kotlin Samples

Android Kotlin image processing examples including reading/saving images, scaling, and format conversion

Date & Time

Date Range Validator

Validate if dates are within a specified range

Games & Entertainment

Chess FEN, PGN & Elo Rating Tutor

Parse & validate FEN board snapshots, PGN/SAN movetext (with parity, check/mate counts, threefold); compute Elo rating updates from win/draw/loss results, with Lichess/Chess.com tier bands

Development

Cron Expression Visualizer

Parse cron schedules, validate standard or Quartz syntax, and visualize the next execution times on a timeline and grouped calendar view

Development

CSV Malformed Row Surgeon

Surgically repair malformed CSV rows one at a time: unescaped (stray) quotes, mixed delimiters (tab/semicolon/comma in the same file), BOM-prefixed headers, CRLF/CR line endings and trailing empty lines. The surgeon parses tolerantly, shows a row-level red/green diff of every change it made (before → after, with the repair reason tagged), lists the rows it accepted unchanged, and emits the cleaned CSV. Optional AI repair can review suspicious rows after the deterministic pass. It complements the CSV Validator (which only reports problems) by actually fixing the damaged rows.

How to use

Set mode to 'Arithmetic Expression', enter the calculation expression, and provide the subscription start date as the anchor datetime.

mode: expression
durationsInput: P1Y2M + P11M - P90D
anchorDatetime: 2026-01-15T00:00:00Z

Outcome

Generates a step-by-step evaluation showing month rollups and calendar-accurate day adjustments ending in P1Y10M2D.