You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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:
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?
(
This correctly applies format after the duration was calculated.
Previously format would always be applied first and the duration parsing would not work since it expects a number.
Fixes: headzoo#92
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 atreact-moment/src/index.jsx
Line 313 in 6f7ec60
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: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?
(
react-moment/src/index.jsx
Line 329 in 6f7ec60
react-moment/src/index.jsx
Line 335 in 6f7ec60
)
I am working with locale different than 'en'.
The text was updated successfully, but these errors were encountered: