Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
smemsh opened this issue Jul 17, 2021 · 0 comments
Open

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

smemsh opened this issue Jul 17, 2021 · 0 comments

Comments

@smemsh
Copy link
Contributor

smemsh commented Jul 17, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant