openScale icon indicating copy to clipboard operation
openScale copied to clipboard

Graph: 31 december measurement is first of year instead of last

Open OverkillGuy opened this issue 5 years ago • 3 comments

In the graph view, 31 December was the firstpoint in the graph instead of last, because it's (incorrectly) marking as Week number 1 (likely a ISO 8601 week number issue).

Screenshot_20200106-230233_openScale

Steps to reproduce the behavior:

  1. Daily weight measurements spanning end of year, including 31st December
  2. Look at "month view" weight graph
  3. Notice 31 december is FIRST point (left-most, "Week 1" side) instead of right

Shown using F-Droid version, not reproduced yet.

Expected behavior 31st December is last date = further right in the graph.

Additional context Seems very related to the "Week Number" of 31st December being marked as Week 1 of the year, which sounds like a small misunderstanding while using ISO 8601 Week number. See Tom Scott's video for some related context.

OverkillGuy avatar Jan 10 '20 17:01 OverkillGuy

Thanks, you are absolutely right, so far I have not found an easy solution, except to replace the Java Calendar implementation with the joda time library.

oliexdev avatar Jan 11 '20 08:01 oliexdev

I see. I am perfectly happy wontfix-ing this issue, it's a tiny corner case that doesn't bother people much. It just made me smile to notice this curiosity, so I thought to report it. Hope it made you smile too.

OverkillGuy avatar Jan 15 '20 09:01 OverkillGuy

true its a tiny problem but this question will be reported every year, so would be great if somebody could fix it.

oliexdev avatar Jan 19 '20 13:01 oliexdev