-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duration.format("hh:mm:ss") for minutes omits hh: #144
Comments
+1 |
thats what im looking for. but is there any way to {trim: false} for default settings? |
ohh nvm i figured out. import moment from 'moment';
import 'moment-duration-format';
moment.duration.fn.format.defaults.trim = false;
console.log( moment.duration( 600, 'seconds' ).format( 'HH:mm:ss' ) ) // 00:30:00
console.log( moment.duration( 600, 'seconds' ).format( 'HH:mm:ss', { trim: false } ) ) // 00:30:00 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was expecting it to be "00:08:00"! Is this a bug? If not, how can I get hours part in the string?
v.2.3.2
The text was updated successfully, but these errors were encountered: