proposal-intl-DateTimeFormat-formatRange:ECMA 402建议的DateTimeFormat.prototype。{formatRange,formatRangeToParts}

时间:2021-05-09 07:24:08
【文件属性】:
文件名称:proposal-intl-DateTimeFormat-formatRange:ECMA 402建议的DateTimeFormat.prototype。{formatRange,formatRangeToParts}
文件大小:46KB
文件格式:ZIP
更新时间:2021-05-09 07:24:08
HTML Intl.DateTimeFormat.prototype.formatRange 概述 动机 网站通常会显示日期间隔或日期范围以显示事件的范围,例如酒店预订,服务的计费期或其他类似用途。 为了实现这一点,网站通常使用本地化库(例如Google Closure)来格式化日期范围,或者它们可能只是简单地诉诸于独立地格式化两个日期。 如果采用第二种方法,则Web开发人员可能会遇到问题,例如重复两个日期之间常见的字段,语言环境的日期顺序不正确或语言环境使用了不正确的定界符。 例如: let date1 = new Date ( Date . UTC ( 2007 , 0 , 10 ) ) ; // "Jan 10, 2007" let date2 = new Date ( Date . UTC ( 2007 , 0 , 20 ) ) ; // "Jan 20, 2007" let fmt
【文件预览】:
proposal-intl-DateTimeFormat-formatRange-master
----package.json(522B)
----index.html(174KB)
----LICENSE(1KB)
----.gitignore(661B)
----spec.emu(70KB)
----.npmrc(19B)
----README.md(7KB)
----.gitattributes(87B)

网友评论