Closed jpuffer closed 7 years ago
It would be great to allow an option to format numbers in a locale-sensitive way as provided by Number.prototype.toLocaleString(), so numbers would have comma separators where appropriate.
Current Behavior: moment.duration(1000, 'days').format("D[ days], H[ hours], m[ minutes]") -> "1000 days, 0 hours, 0 minutes"
Desired Behavior: moment.duration(1000, 'days').format("D[ days], H[ hours], m[ minutes]") -> "1,000 days, 0 hours, 0 minutes"
(or if https://github.com/jsmreese/moment-duration-format/issues/25 ever gets addressed, we could simply get the output: "1,000 days")
+1
It would be great to allow an option to format numbers in a locale-sensitive way as provided by Number.prototype.toLocaleString(), so numbers would have comma separators where appropriate.
Current Behavior: moment.duration(1000, 'days').format("D[ days], H[ hours], m[ minutes]") -> "1000 days, 0 hours, 0 minutes"
Desired Behavior: moment.duration(1000, 'days').format("D[ days], H[ hours], m[ minutes]") -> "1,000 days, 0 hours, 0 minutes"
(or if https://github.com/jsmreese/moment-duration-format/issues/25 ever gets addressed, we could simply get the output: "1,000 days")