work-week ends do not seem to be calculated correctly
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Reproduce the reported commands through the task calc entry point in libshared, using the stated reference date and work-week expressions. Trace the work-week start and end calculations, then verify that each result keeps the Sunday in its current Monday–Sunday week and that start dates precede end dates.
Written by the indexing model from the issue text.
Description
Work week endings may be calculated incorrectly. Observe the following:
$ for ww in {s,e}o{,p,n}ww
do printf "%s\t%s\n" $ww $(
faketime '2017-03-05 12:34:56' task calc $ww
); done
soww 2017-03-13T00:00:00
sopww 2017-02-27T00:00:00
sonww 2017-03-13T00:00:00
eoww 2017-03-10T23:59:59
eopww 2017-03-03T23:59:59
eonww 2017-03-17T23:59:59
with the reference date of 2017-03-05 12:34:56 (a Sunday), and the calendar:
$ ncal 03 2017
March 2017
Mo 6 13 20 27
Tu 7 14 21 28
We 1 8 15 22 29
Th 2 9 16 23 30
Fr 3 10 17 24 31
Sa 4 11 18 25
Su 5 12 19 26
9 10 11 12 13
these do not look right:
- It seems to consider the next "work week" to have already begun on Saturday, but I should think the next work week doesn't actually begin until Monday. Even though there's no actual work days left, it's still within the same work week.
sowwandsonwware identicaleowwis earlier thansoww(!)
This issue was noticed during testing for #47 (a change to comments documenting behavior of eo*) and is forked into a standalone issue as per the discussion there.
(test version of libshared was 591fa58)
- Dominant language
- C++
- Stars
- 7
- Forks
- 30
- Avg merge
- 13h 17m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GothenburgBitFactory/libshared
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
GothenburgBitFactory/libshared#112 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
GothenburgBitFactory/libshared#77 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in GothenburgBitFactory/libshared
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·