Skip to content

A Haskell Code that formats a duration, given as a number of seconds, in a human-friendly way.

License

Notifications You must be signed in to change notification settings

bexum/human-readable-duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

human-readable-duration

A Haskell Code that formats a duration, given as a number of seconds, in a human-friendly way.

Usage

The Repo has one module, HumanReadable.Duration, import it anywhere and use it's export function durationHumanReadable or export ADT Duration.

  • durationHumanReadable :: Int -> Maybe String
  • Duration :: see source
import HumanReadable.Duration ( durationHumanReadable
                              , Duration )

 
a :: Maybe String
a = durationHumanReadable 12345678

b :: String
b = show (read "12345678" :: Duration)

Demo

Jietu20220908-192043@2x

Have fun!🙂

About

A Haskell Code that formats a duration, given as a number of seconds, in a human-friendly way.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published