Fossil SCM

/reports?view=byweek should show week numbers starting at 1

Closed

774a1e7d735b61e… · opened 12 years, 6 months ago

Type
Feature_Request
Priority
Severity
Cosmetic
Resolution
Works_As_Designed
Subsystem
Created
Oct. 1, 2013 3:57 p.m.

While it's perfectly OK for software to start enumerating from 0, human calendar tradition starts calendaring at 1. I suspect that in the future (if not already) there could be small confusion with humans referring to week N of year Y when in fact current version refers to week N-1 of year Y.

Example: /timeline?yw=2013-00&n=2000 shows week 0 of year 2013, which for a human corresponds to the first week of year 2013.

If it does not break current codebase, my suggestion is that this is resolved in favor of usual human interpretation (i.e. first week of the year is numeral 1, not 0).

Comments (3)

nobody 12 years, 6 months ago

While it's perfectly OK for software to start enumerating from 0, human calendar tradition starts calendaring at 1. I suspect that in the future (if not already) there could be small confusion with humans referring to week N of year Y when in fact current version refers to week N-1 of year Y.

Example: /timeline?yw=2013-00&n=2000 shows week 0 of year 2013, which for a human corresponds to the first week of year 2013.

If it does not break current codebase, my suggestion is that this is resolved in favor of usual human interpretation (i.e. first week of the year is numeral 1, not 0).

stephan 12 years, 6 months ago

The reason for this (admittedly confusing) behaviour is because the week number is calculated by sqlite3. Rather that "fudge" that calculation, it seems less problematic to use whatever sqlite3 feeds us.

The /reports and /timeline pages share this data (it's generated by /reports and consumed by /timeline), which means that any fudging of the result would have to be done in two places.

stephan 12 years, 6 months ago

Addenda: it's also intuitive to us (insofar as ANYTHING about our calendar can be considered intuitive!) that a year has 52 weeks, but it's possible for a calendar week to have the value 53 even though the counting starts at 0. For example:

http://www.fossil-scm.org/fossil/reports?view=byweek&y=2007

There is no week 0 because fossil started in the middle of the year, but there is a week #53.

i'm not condoning this behaviour, just reporting it ;).

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button