diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2acffb424..a196ac5e9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,7 @@ repos: args: ["--wrap", "80"] additional_dependencies: - mdformat-gfm + - mdformat-footnote - repo: local hooks: - id: prettier diff --git a/src/fava/help/filters.md b/src/fava/help/filters.md index 3ad718ad7..aad7ef342 100644 --- a/src/fava/help/filters.md +++ b/src/fava/help/filters.md @@ -4,7 +4,7 @@ With the text inputs at the top right of the page, you can filter the entries that are displayed in Fava's reports. If you use multiple filters, the entries matching all of them will be selected. -### Time +## Time Filter entries by their date. You can specify dates and intervals like years, quarters, months, weeks, and days (for example `2015`, `2012-Q1`, `2010-10`, @@ -20,18 +20,35 @@ current year up to today, or `year-1 - year` for all entries of the last and current year. To prevent subtraction, use parentheses: `(month)-10` refers to the 10th of this month, whereas `month-10` would be 10 months ago. -**Week number** Week number of the year (Monday as the first day of the week) as -a decimal number. All days in a new year preceding the first Monday are -considered to be in week 0. +### ISO 8601 Week dates -### Account +The week-based calendar follows +[ISO 8601 week-numbering system](https://en.wikipedia.org/wiki/ISO_week_date) +with each week starting on Mondays and the first week of the ISO week-based year +being the first week that contains the majority of its days in +January[^equivalent-first-week]. + +Some examples where the ISO week-based calendar differs from the Gregorian +calendar: + +- Week 1 of 2025 starts on Monday 30 December 2024 and ends on Sunday 5 January + 2025\. As a result, 30 December 2024 belongs to the year 2025 of the ISO + week-based calendar, despite being in the year 2024 of the Gregorian calendar. +- Week 53 of 2020 ends on Sunday 3 January 2021. As a result, 3 January 2021 + belongs to the year 2020 of the ISO week-based calendar, despite being in the + year 2021 of the Gregorian calendar. + +Most years of the ISO week-based calendars have 52 weeks, but as there are +slightly more than 52 weeks in a year, some years contains a 53rd week. + +## Account Filter entries by account, matching any entry this account is part of. The filter can be an account name, either the full account name or a component of the account name, or a regular expression matching the account name, e.g. `.*Company.*` to filter for all that contain `Company`. -### Filter by tag, link, payee and other metadata +## Filter by tag, link, payee and other metadata This final filter allows you to filter entries by various attributes. @@ -68,3 +85,8 @@ When given regular expressions, Fava checks for a match anywhere in the corresponding attribute. Matching is always case-insensitive. To find out more about the specific syntax Fava uses, refer to [Python's Regular Expression Syntax](https://docs.python.org/3/library/re.html?highlight=match#regular-expression-syntax). + +[^equivalent-first-week]: The following are equivalent ways to identify the first week of the ISO + week-based year: the first week to have the majority of its days in January; + the week that contains the first Thursday of January; and the week that + contains January 4th.