Intl.DateTimeFormat.prototype.formatToParts S4
提案概览
- 阶段: Stage 4
- 状态: 已完成
- ECMAScript 版本: ES2017
- 同步时间: 2026年8月26日
- English original · 官方仓库
提案速览
该提案为 Intl.DateTimeFormat 和 Intl.NumberFormat 添加了 formatToParts 方法,使开发者能够访问格式化字符串的各个组成部分(如月份、货币、数字),以便进行区域设置感知的自定义。
Note
以下 README 来自上游仓库,其中的阶段或状态标注可能滞后;当前信息以提案概览为准。
DateTimeFormat.prototype.formatToParts / NumberFormat.prototype.formatToParts
关于 DateTimeFormat.prototype.formatToParts 和 NumberFormat.prototype.formatToParts 的提案、规范、测试和参考实现。
状态
第 4 阶段
实现进度
- Polyfill
- Gecko 的补丁
反向链接
作者
- Caridy Patiño (@caridy)
- Eric Ferraiuolo (@ericf)
- Zibi Braniecki (@zbraniecki)
审阅者
待定
说明性内容
该提案支持对 Intl 格式化器产生的字符串进行区域设置感知的格式化。