System text formats
systemd timespan parser
Parse compound systemd-style durations into nominal seconds.
Your inputs
Start with an exampleYour result
Example resultAa — A small example of your colors.
How it works
Sum nonnegative decimal values with their unit scales. A month is 30.44 days and a year is 365.25 days.
2h 30min = 7200 + 1800 = 9000 seconds.
Limits
Nominal duration syntax only, up to 10¹² seconds. Nanoseconds and infinity are recognized; individual systemd directives can accept a narrower syntax or use a different default unit.