cal: dates before September 1752 use the Gregorian calendar
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by locating the Rust implementation and tests for cal, then compare its calendar calculations and option parsing with the examples in the issue. The requested behavior covers Julian dates, reform selection, ISO mode, and year bounds; done means the default output and supported options match the specified util-linux behavior, with tests covering the listed examples.
由索引模型根据 Issue 内容生成。
描述
util-linux cal switches to the Julian calendar before the 1752 reform (its default --reform 1752), so September 1752 drops the 3rd to the 13th and earlier months keep their historical weekdays and leap days. cal here uses the Gregorian calendar for every year:
$ cal 9 1752 util-linux 2.41.5 this cal
September 1752 September 1752
Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
1 2 14 15 16 1 2
17 18 19 20 21 22 23 3 4 5 6 7 8 9
24 25 26 27 28 29 30 10 11 12 13 14 15 16 ...
cal 2 1700: util-linux has a 29th and starts on Thursday; here it ends on the 28th and starts on Monday.cal 1 1: util-linux starts on Saturday, here on Monday.cal -j 9 1752: util-linux numbers the days 245, 246, 258, 259...--reform(1752|gregorian|iso|julian) and--isoare not accepted.
Year bounds also differ: util-linux rejects year 0 ("illegal year value: use positive integer") and accepts 10000, where this one shows January 0000 and rejects 10000 with "invalid date".
The output for 1753 and later already matches. Is following util-linux here wanted? If so I can send a PR: Julian weekdays and month lengths before 1752-09-14 by default, and --reform/--iso to choose.
Checked on main a3b2083 against util-linux 2.41.5 (Fedora 43).
- 主要语言
- Rust
- 星标
- 230
- 派生
- 62
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 23
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
uutils/util-linux 的其他 Issue
-
rev: multibyte characters are reversed byte by byte in UTF-8 locales可能已有人在做 @SichenLiang 于 33 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
uutils/util-linux#656 ·
维护者通常 1 天内回复
-
Implement `chrt`未关闭
难度 4/5 3-5 天 新手友好度 48/100
uutils/util-linux#641 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
uutils/util-linux#638 ·
维护者通常 1 天内回复
-
ionice: should the port enforce the documented ranges for -c and -n?可能已有人在做 @mmclinton 于 70 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
uutils/util-linux#624 ·
维护者通常 1 天内回复
-
chcpu: a large cpu-list range runs for hours可能已有人在做 @mmclinton 于 75 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 42/100
uutils/util-linux#620 · 1 条评论 ·
维护者通常 1 天内回复
查看 uutils/util-linux 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
RustCrypto/utils#1597 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
max-sixty/worktrunk#4727 · 7 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
follow-up
难度 2/5 1-3 小时 新手友好度 73/100
carrick-sh/carrick#1859 ·
维护者通常 1 天内回复