sod, som, soy etc do not seem to work as documented
还没有人认领这个 Issue。
评估
调研方向
从 libshared/test/datetime.t.cpp 中的 soy、sod 和 som 用例开始,将它们的预期行为与 issue 中引用的 man-page 表述进行比较。与维护者确认预期的语义,然后调整相关文档和测试,使行为与描述保持一致。
由索引模型根据 Issue 内容生成。
描述
when writing tests for something else I discovered this:
$ date
Fri Jul 16 21:30:41 PDT 2021
$ task calc soy
2021-01-01T00:00:00
$ task calc sod
2021-07-16T00:00:00
$ task calc som
2021-07-01T00:00:00
(same in 2.5.3 and 2.6.0 trunk) but all the documentation says that soX should be start of the next X. Is this known behavior that has changed somewhere, or am I misunderstanding the description from man page:
Start of next (work) week (Monday), calendar week (Sunday or
Monday), month, quarter and year
task ... due:sow
task ... due:soww
task ... due:socw
task ... due:som
task ... due:soq
task ... due:soy
this seems confusing, there is "start of next ..." and "end of current" documented, but nothing for "start of current" which seems to be the actual behavior (not "next"). The tests in libshared/test/datetime.t.cpp seem to agree with the behavior:
Datetime r19a ("soy");
t.ok (r19a.sameYear (now), "soy in same year as now");
t.ok (r19a < now, "soy < now");
but my understanding of the phrase "start of next " means that by definition, it's in the future. What am I missing?
- 主要语言
- C++
- 星标
- 7
- 派生
- 30
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GothenburgBitFactory/libshared 的其他 Issue
-
Unnecessary files from libshared are installed when used as submodule可能已有人在做 @lauft 于 34 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 4/5 3-5 天 新手友好度 30/100
GothenburgBitFactory/libshared#112 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
GothenburgBitFactory/libshared#77 · 1 条评论 ·
-
work-week ends do not seem to be calculated correctly可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 45/100
GothenburgBitFactory/libshared#49 · 2 条评论 ·
查看 GothenburgBitFactory/libshared 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
scp-fs2open/fs2open.github.com#7953 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
SteveMacenski/slam_toolbox#907 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
HansKristian-Work/dxil-spirv#341 ·
维护者通常 1 天内回复