Enable passing `formatStyle` to Intl.DateTimeFormat
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
调研方向
从 src/relative-time-element.ts 中引用行附近的第 173 行和第 188 行开始,将现有的 Intl.RelativeTimeFormat 配置与 Intl.DateTimeFormat 进行比较。阅读链接的 MDN 关于 timeStyle 和 dateStyle 的指导,然后确定对于今天与之后的日期,组件应如何提供这些选项。完成标准是调用方可以通过组件 API 配置所请求的时间和日期样式。
由索引模型根据 Issue 内容生成。
描述
Here A style argument is being passed to the config of the Intl.RelativeTimeFormat constructor.
But Here There's no way to configure the timeStyle or dateStyle properties as described in the MDN docs below:
We have a use case where for DateTime's fitting within the users "today" we only want to display the timeStyle: 'short', but for DateTimes after today we only want to display the dateStyle: 'short' and with the current api I'm not sure how exactly to go about that 🤔
- 主要语言
- JavaScript
- 星标
- 4k
- 派生
- 194
- 平均合并
- 4 天 10 小时
- 30 天内合并 PR
- 5
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/relative-time-element 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
github/relative-time-element#383 · 1 条评论 ·
-
Inconsistent use of "yesterday"可能重新可做 @ayushman1210 于 333 天前认领,目前没有进行中的 PR。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
github/relative-time-element#313 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
github/relative-time-element#307 ·
-
Astro Support未关闭
难度 4/5 3-5 天 新手友好度 30/100
github/relative-time-element#306 · 2 条评论 ·
-
难度 3/5 1-2 天 新手友好度 35/100
github/relative-time-element#293 · 2 条评论 · 5 个 reaction ·
查看 github/relative-time-element 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
status: waiting for maintainer
难度 2/5 1-3 小时 新手友好度 66/100
mui/material-ui#49511 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
mpetazzoni/sse.js#122 ·
-
[eslint-plugin] valid-styles rejects <progress> pseudo-elements (::-webkit-progress-bar, ::-webkit-progress-value, ::-moz-progress-bar)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
swc-project/swc-next#1022 ·
维护者通常 1 天内回复