Created
January 28, 2021 20:27
-
-
Save rotaliator/73ae21316f0cb4088e0c7a7148b61b65 to your computer and use it in GitHub Desktop.
Humanize working time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import '(java.time LocalTime) | |
'(java.time.format DateTimeFormatter)) | |
(defn humanize-working-time [time-in-sec] | |
(-> (LocalTime/parse "00:00:00") | |
(.plusSeconds time-in-sec) | |
(.format (DateTimeFormatter/ofPattern "HH:mm:ss")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment