问题标签 [humanize]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - MetricNumeralExtensions.ToMetric 已过时,使用 MetricNumeralFormats?
我们已将 Humanizer 从 2.8.26 升级到 2.11.10,现在收到以下警告:
有没有关于如何使用 MetricNumeralFormats 的示例?我应该用什么让它工作?
这是我们当前的代码:
duration - 如何转换 ISO 持续时间并使其人性化
我有一个 ISO 持续时间值,我需要显示“XX 年,XX 个月,XX 天”。我使用它luxon和humanize -duration。Duration.fromISO() 工作正常,但人性化持续时间转换出错。你能帮忙吗?
输出:
P1Y11M3D; 1年10个月28天
P2Y1M30D; 2年1个月29天