to_hms pad zeros #4

This commit is contained in:
familyfriendlymikey 2023-01-25 15:59:59 -05:00
parent d1a9d62439
commit ede251ff64

View File

@ -46,7 +46,7 @@ def to_hms secs
Math.floor secs / 3600
Math.floor (secs % 3600) / 60
Math.round((secs % 3600 % 60) * 1000) / 1000
].filter(Boolean).join("-")
].map(do String($1).padStart(2,0)).join("-")
def main