week 51/52 display incorrectly in Statistics Report

Bug #2000292 reported by Neal Haas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Medium
Maxime DOYEN

Bug Description

version: 5.6

In Statistics Report,
View by: <any>
Interval: Week

When I have Range: 12/24/2022 - 12/31/2022 I see 2022-w51, 2022-w52, Average, Total columns <- OK
When I have Range: 12/25/2022 - 12/31/2022 I see 2022-w51 (no data), Average, Total columns <- Bad
When I have Range: 12/26/2022 - 12/31/2022 I see 2022-w52, Average, Total columns <- OK

This seems to be related to the fact that a 'week' always begins on a Monday. I wonder if there has already been conversation about weeks always starting on a Monday. I would have expected that YYYY-w01 would have always started with January 1st of the year.

Revision history for this message
Maxime DOYEN (mdoyen) wrote (last edit ):

what is used is iso 8601
fixed with bug 1915643, as so far everything seems correct

Maxime DOYEN (mdoyen)
Changed in homebank:
status: New → Incomplete
Revision history for this message
Neal Haas (nh3456) wrote :

Sorry for conflating 2 ideas. I'll explain with screen captures.
#1 includes txn from w51 and w52 and looks correct

Revision history for this message
Neal Haas (nh3456) wrote :

#2 narrows the date range but still touches w51 and w52
note: the txns are only on the following dates: 23, 27, 28, 30

Revision history for this message
Neal Haas (nh3456) wrote :

#3 is fully within w52 and looks correct

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Incomplete → New
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Thanks Neal.
Crystal clear now ;)

Changed in homebank:
status: New → Confirmed
summary: - bug: week 51/52 display incorrectly in Statistics Report
+ week 51/52 display incorrectly in Statistics Report
Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Medium
milestone: none → 5.6.1
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Confirmed → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

This seems to be related to the fact that a 'week' always begins on a Monday.
=>in fact no, just a stupid bug in computing the columns to display.

I wonder if there has already been conversation about weeks always starting on a Monday. I would have expected that YYYY-w01 would have always started with January 1st of the year.
=> like said, I coded this initially but changed to ISO 8601 with bug 1915643
https://en.wikipedia.org/wiki/ISO_week_date

Changed in homebank:
status: In Progress → Fix Committed
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.