Skip to content

rodyo/FEX-seconds2human

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

View Convert seconds to human readable string(s) on File Exchange

Donate to Rody

FEX-seconds2human

This function converts a (usually large) amount of seconds to human-readable string. For example,

str = seconds2human(1463456.3) str = 'About 2 weeks and 2 days.' You may also call the function with a second input argument; either 'short' (the default) or 'full'. This determines the level of detail returned in the string: str = seconds2human(1463456.3, 'full') str = '2 weeks, 2 days, 22 hours, 30 minutes, 56 seconds.'

The 'short' format returns only the two largest units of time.

Furthermore, [secs] may be an NxM-matrix, in which case the output is an NxM cell array of the corresponding strings.

If you like this work, please consider a donation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages