Bug #31
Incorrect calendar alignment on a weekly timeframe
| Status: | Closed | Start: | 10/06/2009 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | Spent time: | - | |
| Target version: | - | |||
Description
When a calendar is aligned on weekly time frame, the outcome for Sundays and Mondays is wrong or counter-intuitive. Every day of week (Tue-Sat) is aligned to the prior Monday. But Monday is aligned to the upcoming Monday and Sunday it is aligned to the next Saturday !
This is what happens:
Tue 8/4/2009 -> Mon 8/3/2009
Wed 8/5/2009 -> Mon 8/3/2009
Thu 8/6/2009 -> Mon 8/3/2009
Fri 8/7/2009 -> Mon 8/3/2009
Sat 8/8/2009 -> Mon 8/3/2009
Mon 8/3/2009 -> Mon 8/10/2009 (was)
-> Mon 8/03/2009 (now)
Sun 8/2/2009 -> Mon 8/8/2009 (was)
-> Mon 7/27/2009 (now)
I think that Monday should be aligned to itself and Sunday should be aligned to the prior Monday. I attached a patch with the fix and updated unit tests.
PS: I think we should be mention somewhere in the documentation that a week starts on Monday.
History
Updated by Mike Kroutikov 270 days ago
- Status changed from New to Closed