Past date ranges seem to be reversed #465

Closed
opened 2025-11-01 20:56:34 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @vikunja-bot on GitHub (Apr 1, 2025).

Original issue by andreymal on 2024-06-02T17:13:45.000Z

Description

There's my understanding of date ranges:

  • today: 2024-06-02
  • this week: 2024-05-27 .. 2024-06-02 (assuming Monday is the first day of the week)
  • beginning of this week: 2024-05-27
  • end of this week: 2024-06-02
  • last week: 2024-05-20 .. 2024-05-26
  • beginning of last week: 2024-05-20
  • end of last week: 2024-05-26

However, the actual date ranges seem to be reversed:

  • 'beginningOflastWeek': 'now/w-1w' — 2024-05-20 (ok)

  • 'endOfLastWeek': 'now/w-2w' — 2024-05-13 (?????)

  • 'lastWeek': ['now/w-1w', 'now/w-2w'] — 2024-05-20 .. 2024-05-13 (????????????)

Same with months.

Is this a bug, or am I missing something?

Vikunja Version

any

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

Yes

Screenshots

No response

Original issue on Gitea


@kolaente commented on 2024-06-02T19:23:42.000Z:

This looks like a bug.

endOfLastWeek should be something like now/w-1w-1d (start of this week, minus one week, minus one day). If this should be "friday of last week" as in, end of the work week, this would be different still.

lastWeek seems to be off by one week and one day.

Originally created by @vikunja-bot on GitHub (Apr 1, 2025). _Original issue by andreymal on 2024-06-02T17:13:45.000Z_ ### Description There's my understanding of date ranges: * today: 2024-06-02 * this week: 2024-05-27 .. 2024-06-02 (assuming Monday is the first day of the week) * beginning of this week: 2024-05-27 * end of this week: 2024-06-02 * last week: 2024-05-20 .. 2024-05-26 * beginning of last week: 2024-05-20 * end of last week: 2024-05-26 However, [the actual date ranges](https://kolaente.dev/vikunja/vikunja/src/commit/aac01c7a35836421c17882b4f77334fc14bfeaec/frontend/src/components/date/dateRanges.ts) seem to be reversed: * `'beginningOflastWeek': 'now/w-1w'` — 2024-05-20 (ok) * `'endOfLastWeek': 'now/w-2w'` — 2024-05-13 (?????) * `'lastWeek': ['now/w-1w', 'now/w-2w']` — 2024-05-20 .. 2024-05-13 (????????????) Same with months. Is this a bug, or am I missing something? ### Vikunja Version any ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? Yes ### Screenshots _No response_ [Original issue on Gitea](https://kolaente.dev/vikunja/vikunja/issues/2343) --- _**@kolaente** commented on 2024-06-02T19:23:42.000Z_: This looks like a bug. `endOfLastWeek` should be something like `now/w-1w-1d` (start of this week, minus one week, minus one day). If this should be "friday of last week" as in, end of the work week, this would be different still. `lastWeek` seems to be off by one week and one day.
GiteaMirror added the kind/bug label 2025-11-01 20:56:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#465