Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert raw seconds into a human-readable amount of time
ResourceFunction["ReadableTimeString"][seconds] converts seconds into a human-readable time string. |
"Decimals" | Automatic | the number of decimal places after the decimal point |
NumberPoint | "." | the decimal point character, e.g. in South Africa you might use a comma |
"PrefixShort" | True | use short prefixes instead of long, e.g. "m" for "mega" |
"ReturnQuantity" | False | whether to return a Quantity object instead of a string |
"Spacer" | " " | string that goes in between the number and unit |
millisecond | "ms" |
second | "s" |
minute | "m" |
hour | "h" |
day | "d" |
week | "w" |
month | "M" |
year | "Y" |
Convert seconds into a human-readable amount:
In[1]:= |
Out[1]= |
ReadableTimeString works on many time scales:
In[2]:= |
Out[2]= |
Return a rounded amount:
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
In[6]:= |
Out[6]= |
This work is licensed under a Creative Commons Attribution 4.0 International License