# \`os.date("%V")\` returns the wrong week number

**URL:** <https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310>\
**Category:** Lua\
**Created:** [May 5, 2025, 9:38am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310 "2025-05-05T09:38:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LumenYoung](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lumenyoung/32/368_2.png) [@LumenYoung](https://community.silverbullet.md/u/LumenYoung)\
**Post date:** [May 5, 2025, 9:38am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/1 "2025-05-05T09:38:32Z")

</div>

Right now it is 2025-05-05, the 19th week of the 2025. Yet you can try

```auto
${
os.date("%V")
}

```

And you get 18.

---

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [May 5, 2025, 9:48am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/2 "2025-05-05T09:48:55Z")

</div>

I think this was fixed here: [Fix week calculation by lochel · Pull Request #1368 · silverbulletmd/silverbullet · GitHub](https://github.com/silverbulletmd/silverbullet/pull/1368)

---

<div class="post-metadata">

**Author:** ![LumenYoung](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lumenyoung/32/368_2.png) [@LumenYoung](https://community.silverbullet.md/u/LumenYoung)\
**Post date:** [May 5, 2025, 9:53am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/3 "2025-05-05T09:53:01Z")

</div>

I’ll update my instance. Thanks Zef!

---

<div class="post-metadata">

**Author:** ![LumenYoung](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lumenyoung/32/368_2.png) [@LumenYoung](https://community.silverbullet.md/u/LumenYoung)\
**Post date:** [May 5, 2025, 10:14am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/4 "2025-05-05T10:14:30Z")

</div>

I’ve made the update and still not working yet. Have you tried on your instance?

---

<div class="post-metadata">

**Author:** ![lochel](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lochel/32/912_2.png) [@lochel](https://community.silverbullet.md/u/lochel)\
**Post date:** [May 5, 2025, 11:01am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/5 "2025-05-05T11:01:30Z")

</div>

It returns 19 for me.

---

<div class="post-metadata">

**Author:** ![LumenYoung](https://community.silverbullet.md/user_avatar/community.silverbullet.md/lumenyoung/32/368_2.png) [@LumenYoung](https://community.silverbullet.md/u/LumenYoung)\
**Post date:** [May 5, 2025, 11:29am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/6 "2025-05-05T11:29:16Z")

</div>

Now it returns 19 for me after I 1) wiped the client 2) refresh the widget.

Maybe there are some caching mechanism on the offline mode that you need to refresh on deeper level.

Thanks for the fix BTW!

---

<div class="post-metadata">

**Author:** ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)\
**Post date:** [May 5, 2025, 1:56pm UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/7 "2025-05-05T13:56:15Z")

</div>

To get new client files you always need to reload twice. No wipes required, just reload a few times (slowly).

---

<div class="post-metadata">

**Author:** ![kolmone](https://community.silverbullet.md/user_avatar/community.silverbullet.md/kolmone/32/948_2.png) [@kolmone](https://community.silverbullet.md/u/kolmone)\
**Post date:** [May 6, 2025, 7:12am UTC](https://community.silverbullet.md/t/os-date-v-returns-the-wrong-week-number/2310/8 "2025-05-06T07:12:50Z")

</div>

Nice to see this is fixed, I had also noticed this and even prototyped a fix but never got around to actually integrating it into Silverbullet.
