Templater Weekly Note shows Invalid Date

I have read the other posts but nothing seems to fix my problem.

My Templater Weekly Note shows Invalid Date.

My Calendar setting is Locale default (Sunday). My Calendar Override locale: is set to Same as system (en-us).

My Weekly Periodic Notes format is set to YYYY/gggg-[W]ww.

TPL Weekly Note is set to:

<%“—”%>
year: <% moment(tp.file.title, “YYYY-[W]WW”).format(“gggg”) %>
quarter: <% moment(tp.file.title, “YYYY-[W]WW”).format(“Q”) %>
month: <% moment(tp.file.title, “YYYY-[W]WW”).format(“MM”) %>
week: <% moment(tp.file.title, “YYYY-[W]WW”).format(“WW”) %>

How do I fix the Invalid Date? Thankful for any help I can get.

What I’m trying to do

Things I have tried

In the Templater parts, have you tried YYYY-[W]ww?

Isn’t that the same as what is showing in the original post?

Isn’t that the same as what is showing in the original post? Sorry, I see, small w’s instead of capital.

I tried YYYY-[W]ww and still get Invalid date.