Time converter
Time converter, no network, no rounding surprises.
Runs on your device. The file is never uploaded.
Time converter scales a length of time across ms, s, min, h, d, wk and yr. A second is the base unit, so a week is 604800. A year is 31557600 seconds, or 365.25 days rather than 365. Months are missing from the table on purpose, and a calendar date belongs in Timestamp & date converter instead.
Questions
Which time units are supported?
Seven: s, ms, min, h, d, wk and yr. Seconds are the base. A minute is 60 s, an hour 3600, a day 86400 and a week 604800. There is no month unit, because a month has no fixed length, and none is invented here to fill the gap.
How long is a year in this tool?
31557600 seconds, which is 365.25 days, the Julian year. That average includes a leap day every four years rather than assuming a calendar year of 365 days. If you are counting real calendar days between two dates, this is the wrong tool: it converts durations, and a duration in years has to pick a convention.
Why is there no month?
Because a month is not a fixed length. February and July differ by three days, so any factor would be an average that quietly disagrees with every real calendar. The table stops at weeks and years. For calendar arithmetic, run both dates through the timestamp converter and subtract the Unix values.
Can I convert a date with this?
No. This turns one duration into another, for example 90 min into h. A point in time, such as a Unix timestamp or an ISO date, belongs in the timestamp converter, which prints the ISO form, both Unix forms, the UTC string and the day of the week.
Why is my answer a long decimal?
Because nothing is rounded. The value is multiplied by the from factor, divided by the to factor and printed raw, so 100 ms into s comes out clean while an hour into weeks does not. Round it yourself for display; the extra digits are floating-point detail, not meaningful precision about your duration.