Closed bendavis78 closed 6 years ago
Not sure if that ever worked, but it certainly doesn't now... From moment itself, the duration constructor only takes two arguments:
function createDuration (input, key)
https://momentjs.com/docs/#/durations/
And from what I can tell the second argument is a unit of measurement as defined in moment, e.g. minutes
or seconds
or a shorthand unit, e.g. m
or s
. It doesn't look like a format string is supported there.
My plugin doesn't affect parsing of duration strings in moment.duration
!
Makes sense. Thanks!
Not sure whether or not this is an issue with moment core, but the following use case is broken:
should result in 5 minutes 30 seconds, but instead it results in 5 hours 30 minutes.