jsmreese / moment-duration-format

Format function plugin for the Moment Duration object.
MIT License
967 stars 121 forks source link

How can I pad a format? #158

Closed VictorioBerra closed 2 years ago

VictorioBerra commented 2 years ago

For example:

moment.duration(1, 'seconds').format("D.hh:mm:ss")

Should return 0.00:00:01

But instead returns 1.

I need this to work with ASPNET where I POST the format to an endpoint that modelbinds it to a TimeSpan.

VictorioBerra commented 2 years ago

Apparently I cant read the docs, the answer is trim: false