Incorrect Week number for the week of 2025-12-28

Steps to reproduce

Here’s a sample base from the sandbox vault:

formulas:
  Untitled: now().format("YYYY-[W]WW")
views:
  - type: table
    name: Table
    order:
      - file.name
      - formula.Untitled

Did you follow the troubleshooting guide? [Y/N]

Y

Expected result

2026-W01

Actual result

2025-W01

Environment


SYSTEM INFO:
Obsidian version: v1.11.2
Installer version: v1.7.7
Operating system: Darwin Kernel Version 25.1.0: Mon Oct 20 19:34:05 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6041 25.1.0
Login status: logged in
Language: en
Catalyst license: supporter
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none

Additional information

Obviously I was not just creating a property to show the week, but using this function to find files with tags. My plugin creates the proper tag for this week (2026-W01), but bases can’t find them.

Online sites confirm that this week should be 2026-W01.

This is not a bug. You should not use YYYY for this case.

1 Like

You should use the “Week Year (ISO)” MomentJS token (i.e.: GGGG) when dealing with ISO weeks as opposed to the “Year” token (i.e.: YYYY) :blush:
Otherwise, yes you can run into “inconsistencies”…

In other words, you formula should be:

now().format("GGGG-[W]WW")

Same goes if you prefer to use localized “Week Year”… You should then use gggg, as in gggg-[w]ww

2 Likes

thanks

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.