Skip to content

Which week numbering system is used for happens date filters? #2743

Answered by arthur-st
arthur-st asked this question in Q&A
Discussion options

You must be logged in to vote

I have tried explain, and it doesn't quite yield the answer to my question, e.g.:

Explanation of this Tasks code block query:

  filter by function task.done.moment?.isSame(moment("2024-04-01").subtract(1, 'weeks'), 'week') || task.cancelled.moment?.isSame(moment("2024-04-01").subtract(1, 'weeks'), 'week') || false

  group by status.type

  No sorting instructions supplied.

What I was unsure about is whether if isSame(x, 'week') operations happens in the coordinate system of ISO weeks or non-ISO weeks. Looking at the isSame reference now on Moment's API documentation, it looks like I can switch this to ISO weeks by using 'isoWeek' in place of 'week'.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@arthur-st
Comment options

Answer selected by arthur-st
@arthur-st
Comment options

@claremacrae
Comment options

@arthur-st
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
scope: filters Additions and modifications to the search filters
2 participants