Skip to content

Supported Duration Formats

Christopher Wolf edited this page Jan 18, 2026 · 1 revision

The application provides a flexible time parser that understands both technical and natural language inputs. You can use these formats wherever a time duration is required.

Standard Duration Format

This format is best for precise, structured input. It follows the pattern: [days.]HH:mm:ss[.milliseconds]

Component Format Range / Description
Days d. Optional. Any number of digits followed by a dot.
Hours HH Required. 00 to 23.
Minutes mm Required. 00 to 59.
Seconds ss Required. 00 to 59.
Milliseconds .fff Optional. Up to 3 digits following a dot.

Examples:

  • 12:30:00 → 12 hours, 30 minutes
  • 1.05:00:00 → 1 day, 5 hours
  • 00:00:45.500 → 45.5 seconds

Human-Readable Format

This format is ideal for quick CLI input. You can mix and match units using full names or shorthand.

Supported Units

Unit Keywords (Case-Insensitive)
Days d, day, days
Hours h, hour, hours
Minutes m, min, minute, minutes
Seconds s, sec, second, seconds
Milliseconds ms, millisecond, milliseconds

Key Features

  • Decimal Support: You can use decimals for larger units (e.g., 1.5h for 1 hour and 30 minutes).
  • Flexible Spacing: 1h30m and 1 h 30 m are both valid.
  • Automatic Rounding: All inputs are rounded to the nearest millisecond.

Examples:

  • 1d 12h
  • 5m 30s
  • 1.5 hours
  • 100ms
  • 2days 4h 15m 30s

Clone this wiki locally