【发布时间】:2017-03-01 02:22:58
【问题描述】:
【问题讨论】:
-
不这么认为。无论如何,这种格式对语言环境并不友好。
标签: javascript reactjs react-intl
【问题讨论】:
标签: javascript reactjs react-intl
我做了一些研究,并在 react-intl 的 github 存储库上发布了一个问题作为问题 这是我得到的答案:
"This is not currently possible, but this is the exact use-case for the
formatToParts() API that we standardized as part of JavaScript!
Eventually we'll use this API directly within React Intl."
替代解决方案:
在研究过程中,我发现了另一个有趣的 NPM 模块,名为 DateFormat 该工具非常灵活,我能够通过设置日期的每个元素的样式来获得所需的结果
【讨论】: