Cannot set settings for moment-duration-format / templating broken
Actually the statement in issue's title is not completely true, however, I cannot set template, or simple trim: false.
The code itself, allows providing settings object as the only argument to Duration's .format, however, react-moment tries to use that object to format datetime at https://github.com/headzoo/react-moment/blob/6f7ec60cf32a23c1f03d3337189327778dfb3a44/src/index.jsx#L313 which throws exception as it is not a String instance.
It could be worked around by setting fromNowDuring to anything, so it does not crash anymore, however, in the final result, I am getting "00"s as values in output string:
import Moment from "react-moment';
<Moment fromNowDuring durationFromNow date={ new Date("2019-12-24 12:00:00") } format={ { template: "dd [__] hh [__] mm [__] ss [__]", trim: false } }/>
will output:
00 days 00 hours 00 minutes 00 seconds
Putting that template into pure Duration.format() gives expected result. Is it possible that's due to use of plain "moment" vs configured Moment.globalMoment? ( https://github.com/headzoo/react-moment/blob/6f7ec60cf32a23c1f03d3337189327778dfb3a44/src/index.jsx#L329 https://github.com/headzoo/react-moment/blob/6f7ec60cf32a23c1f03d3337189327778dfb3a44/src/index.jsx#L335 )
I am working with locale different than 'en'.