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
When moment.duration is "604800000" it shows 1 week, but when moment.duration is "604800100", it shows 0 seconds instead of 1 week, 0 days, 0 hours, 0 minutes and 1 second.
const moment = require("moment");
require("moment-duration-format");
moment.updateLocale('en', {
durationLabelsStandard: {
s: "second",
ss: "seconds",
m: "minute",
mm: "minutes",
h: "hour",
hh: "hours",
d: "day",
dd: "days",
w: "week",
ww: "weeks",
M: "month",
MM: "moths",
y: "year",
yy: "years"
},
})
const duration = moment.duration("3660000").format(`y __, M __, w __, d __, h __, m __ [and] s __`);
console.log(duration)
The text was updated successfully, but these errors were encountered:
When
moment.duration is "604800000"
it shows 1 week, but whenmoment.duration is "604800100"
, it shows 0 seconds instead of 1 week, 0 days, 0 hours, 0 minutes and 1 second.The text was updated successfully, but these errors were encountered: