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

sod, som, soy etc do not seem to work as documented

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp
领域
backend

调研方向

从 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 模板
  • 阅读贡献指南

从这里开始

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

GothenburgBitFactory/libshared 的其他 Issue

查看 GothenburgBitFactory/libshared 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

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