Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

xlsx: built-in date format 14 should use the locale short date

未关闭
#1,185 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
localization

调研方向

Start in src/odr/internal/ooxml/spreadsheet/ooxml_spreadsheet_style.cpp at the table mapping built-in numFmtId values, where 14 currently becomes mm-dd-yy; then trace how the document locale (or system regional settings) reaches the renderer, since ECMA-376 Part 1 §18.8.30 makes formats 14-17 and 22 locale-dependent. Reproduce with an xlsx cell carrying numFmtId="14" and value 41640, and confirm done when en-US renders 1/1/2014 and the v7.4.0→v7.5.0 reference-output check passes.

由索引模型根据 Issue 内容生成。

描述

bug formatting

An xlsx cell with the built-in number format 14 shows its date as 01-01-14. Excel and LibreOffice show the short date of the locale, for example 1/1/2014 in en-US.

src/odr/internal/ooxml/spreadsheet/ooxml_spreadsheet_style.cpp maps format 14 to mm-dd-yy, the code that ECMA-376 Part 1, 18.8.30 lists. But the spec also says that formats 14 to 17 and 22 follow the regional settings of the system. So the renderer must use the short date of the document locale, not the fixed code.

Steps:

  1. Open an xlsx with a cell that has numFmtId="14" and the value 41640.
  2. Render it.

Expected: 1/1/2014 (for en-US). Actual: 01-01-14.

In v7.4.0, the cell showed the raw serial 41640, so this is not a regression. The v7.4.0 → v7.5.0 reference-output check found it.

🤖 Generated with Claude Code

主要语言
C++
星标
41
派生
10
平均合并
12 小时 4 分钟
30 天内合并 PR
297

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

opendocument-app/OpenDocument.core 的其他 Issue

查看 opendocument-app/OpenDocument.core 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。